mirror of
https://github.com/alsk1992/CloddsBot.git
synced 2026-10-02 02:54:40 +08:00
release: move CLI distribution to GitHub
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Verify types
|
||||
run: npm run typecheck
|
||||
|
||||
- name: Pack CLI
|
||||
run: |
|
||||
mkdir release
|
||||
npm pack --pack-destination release
|
||||
cd release
|
||||
mv clodds-*.tgz clodds.tgz
|
||||
sha256sum clodds.tgz > clodds.tgz.sha256
|
||||
|
||||
- name: Publish GitHub Release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
|
||||
gh release upload "$GITHUB_REF_NAME" release/clodds.tgz release/clodds.tgz.sha256 --clobber
|
||||
else
|
||||
gh release create "$GITHUB_REF_NAME" release/clodds.tgz release/clodds.tgz.sha256 --verify-tag --generate-notes --title "Clodds $GITHUB_REF_NAME"
|
||||
fi
|
||||
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.9.1] - 2026-09-12
|
||||
|
||||
### Changed
|
||||
- Moved supported CLI distribution from the inaccessible legacy npm package to installable GitHub Release archives.
|
||||
- Updated the installer, upgrade guidance, documentation, and release badge to use GitHub Releases.
|
||||
- Corrected CLI version output to read the installed package version.
|
||||
- Prevented type-only checks from poisoning the incremental cache used by release builds.
|
||||
- Updated supported-version, dependency-audit, Node.js, and bundled-skill documentation to match the current release.
|
||||
- The Docker runtime now runs as the unprivileged `node` user and keeps writable state under `/data`.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/clodds"><img src="https://img.shields.io/npm/v/clodds?color=blue" alt="npm version"></a>
|
||||
<a href="https://github.com/alsk1992/CloddsBot/releases/latest"><img src="https://img.shields.io/github/v/release/alsk1992/CloddsBot?display_name=tag&color=blue" alt="GitHub release"></a>
|
||||
<img src="https://img.shields.io/badge/node-%3E%3D22-brightgreen" alt="Node.js">
|
||||
<img src="https://img.shields.io/badge/typescript-5.3-blue" alt="TypeScript">
|
||||
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-yellow" alt="MIT License"></a>
|
||||
@@ -54,10 +54,12 @@ Powered by Claude with 118+ trading strategies, whale tracking, arbitrage detect
|
||||
> **Requirement:** Node.js 22 or newer. Node.js 20 is not supported and dependency installation may fail.
|
||||
|
||||
```bash
|
||||
npm install -g clodds --loglevel=error
|
||||
npm install -g https://github.com/alsk1992/CloddsBot/releases/latest/download/clodds.tgz --loglevel=error
|
||||
clodds onboard
|
||||
```
|
||||
|
||||
> The old `clodds` package on npmjs.com is no longer maintained. Install the current release from GitHub using the command above.
|
||||
|
||||
That's it. The setup wizard walks you through everything — API key, messaging channel, and starts the gateway. WebChat opens at `http://localhost:18789/webchat`.
|
||||
|
||||
<details>
|
||||
@@ -78,7 +80,7 @@ npm run build && npm start
|
||||
[](https://cloddsbot.com/onboard.mp4)
|
||||
|
||||
The demo shows:
|
||||
- `npm install -g clodds` → `clodds onboard`
|
||||
- Install the latest GitHub Release → `clodds onboard`
|
||||
- Onboarding wizard walks through credentials setup
|
||||
- Fetches live 15-minute BTC prediction markets from Polymarket (in real-time)
|
||||
- One command away from trading
|
||||
|
||||
+2
-2
@@ -243,10 +243,10 @@ OTEL_SAMPLE_RATE=1.0
|
||||
|
||||
## Deployment Options
|
||||
|
||||
### 1. npm Install (Recommended)
|
||||
### 1. GitHub Release (Recommended)
|
||||
|
||||
```bash
|
||||
npm install -g clodds
|
||||
npm install -g https://github.com/alsk1992/CloddsBot/releases/latest/download/clodds.tgz
|
||||
clodds onboard
|
||||
```
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ You can control paths for config and workspace with:
|
||||
|
||||
## Deployment options
|
||||
|
||||
### 1) npm install (recommended)
|
||||
### 1) GitHub Release (recommended)
|
||||
|
||||
```bash
|
||||
npm install -g clodds
|
||||
npm install -g https://github.com/alsk1992/CloddsBot/releases/latest/download/clodds.tgz
|
||||
clodds onboard
|
||||
```
|
||||
|
||||
|
||||
+3
-1
@@ -5,10 +5,12 @@ Get Clodds running in 2 commands.
|
||||
## Install & Setup
|
||||
|
||||
```bash
|
||||
npm install -g clodds
|
||||
npm install -g https://github.com/alsk1992/CloddsBot/releases/latest/download/clodds.tgz
|
||||
clodds onboard
|
||||
```
|
||||
|
||||
The legacy `clodds` package on npmjs.com is outdated; supported builds are published through GitHub Releases.
|
||||
|
||||
The setup wizard will:
|
||||
1. Ask for your [Anthropic API key](https://console.anthropic.com)
|
||||
2. Let you pick a messaging channel (WebChat, Telegram, Discord, or Slack)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ chat commands, and common workflows.
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
npm install -g clodds
|
||||
npm install -g https://github.com/alsk1992/CloddsBot/releases/latest/download/clodds.tgz
|
||||
clodds onboard
|
||||
```
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "clodds",
|
||||
"version": "1.9.0",
|
||||
"version": "1.9.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "clodds",
|
||||
"version": "1.9.0",
|
||||
"version": "1.9.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+3
-7
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "clodds",
|
||||
"version": "1.9.0",
|
||||
"version": "1.9.1",
|
||||
"description": "Open-source AI trading terminal. Trade Polymarket, Kalshi, Betfair, Binance, Bybit, Hyperliquid, Solana DEXs from Telegram, Discord, Slack or web. Arbitrage detection, whale tracking, copy trading, perpetual futures up to 200x, DeFi swaps, MEV protection. Self-hosted, 119 skills, powered by Claude.",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@@ -13,12 +13,11 @@
|
||||
"gateway": "tsx src/gateway/index.ts",
|
||||
"worker": "tsx src/bin/worker.ts",
|
||||
"onboard": "tsx src/cli/onboard.ts",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"typecheck": "tsc --noEmit --incremental false",
|
||||
"test": "node --test --import tsx --import ./tests/helpers/test-setup.ts \"tests/**/*.test.ts\"",
|
||||
"ci": "npm run typecheck && npm run test && npm run build",
|
||||
"postinstall": "node scripts/fix-native-bindings.js && node scripts/fix-anchor-bn-export.js && node -e \"try{const{pipeline,env}=require('@xenova/transformers');env.cacheDir='./.transformers-cache';pipeline('feature-extraction','Xenova/all-MiniLM-L6-v2',{quantized:true}).then(()=>console.log('Embedding model cached')).catch(()=>{})}catch{}\"",
|
||||
"prepublishOnly": "npm run build",
|
||||
"publish:npm": "npm publish --registry https://registry.npmjs.org"
|
||||
"prepack": "npm run build"
|
||||
},
|
||||
"keywords": [
|
||||
"trading",
|
||||
@@ -68,9 +67,6 @@
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.78.0",
|
||||
"@anthropic-ai/tokenizer": "^0.0.4",
|
||||
|
||||
@@ -16,6 +16,7 @@ import { execApprovals } from '../../permissions';
|
||||
import type { User } from '../../types';
|
||||
import { loadConfig } from '../../utils/config';
|
||||
import { loginWhatsAppWithQr, resolveWhatsAppAuthDir } from '../../channels/whatsapp/index';
|
||||
import { RELEASE_INSTALL_COMMAND, RELEASES_URL, VERSION } from '../../version';
|
||||
|
||||
// =============================================================================
|
||||
// CONFIG COMMANDS
|
||||
@@ -2058,11 +2059,10 @@ export function createUpgradeCommand(program: Command): void {
|
||||
console.log('Checking for updates...');
|
||||
|
||||
if (options.check) {
|
||||
console.log('Current version: 0.1.0');
|
||||
console.log('Latest version: 0.1.0');
|
||||
console.log('You are up to date!');
|
||||
console.log(`Current version: ${VERSION}`);
|
||||
console.log(`Latest release: ${RELEASES_URL}`);
|
||||
} else {
|
||||
console.log('To upgrade, run: npm install -g clodds@latest');
|
||||
console.log(`To upgrade, run: ${RELEASE_INSTALL_COMMAND}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2107,7 +2107,7 @@ export function createVersionCommand(program: Command): void {
|
||||
.description('Show detailed version info')
|
||||
.action(async () => {
|
||||
console.log('\nClodds Version Info\n');
|
||||
console.log(' Version: 0.1.0');
|
||||
console.log(' Version: ' + VERSION);
|
||||
console.log(' Node.js: ' + process.version);
|
||||
console.log(' Platform: ' + process.platform);
|
||||
console.log(' Arch: ' + process.arch);
|
||||
|
||||
+2
-1
@@ -30,6 +30,7 @@ import { createGateway } from '../gateway/index';
|
||||
import { loadConfig } from '../utils/config';
|
||||
import { logger } from '../utils/logger';
|
||||
import { installHttpClient, configureHttpClient } from '../utils/http';
|
||||
import { VERSION } from '../version';
|
||||
|
||||
import { createSkillsCommands } from './commands/skills';
|
||||
import { addAllCommands } from './commands/index';
|
||||
@@ -50,7 +51,7 @@ process.on('uncaughtException', (error) => {
|
||||
program
|
||||
.name('clodds')
|
||||
.description('Claude + Odds: AI assistant for prediction markets')
|
||||
.version('0.1.0');
|
||||
.version(VERSION);
|
||||
|
||||
// Start command
|
||||
program
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
export const RELEASES_URL = 'https://github.com/alsk1992/CloddsBot/releases/latest';
|
||||
export const RELEASE_INSTALL_COMMAND = `npm install -g ${RELEASES_URL}/download/clodds.tgz`;
|
||||
|
||||
export const VERSION = (() => {
|
||||
try {
|
||||
const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8')) as {
|
||||
version?: string;
|
||||
};
|
||||
return packageJson.version ?? 'unknown';
|
||||
} catch {
|
||||
return 'unknown';
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user