mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-05-22 08:46:57 +02:00
fix: remove redundant update command
Image is already auto-pulled by `ensureImage()` during `start` when the pinned version tag is missing locally. Manual `update` was unnecessary.
This commit is contained in:
@@ -71,7 +71,6 @@ npx @keygraph/shannon setup
|
||||
|
||||
# Image management
|
||||
./shannon build [--no-cache] # Local mode: build worker image
|
||||
npx @keygraph/shannon update # npx mode: pull latest image
|
||||
npx @keygraph/shannon uninstall # npx mode: remove ~/.shannon/ (confirms first)
|
||||
|
||||
# Build TypeScript (development)
|
||||
@@ -98,7 +97,7 @@ packages/mcp-server/ — @shannon/mcp-server (private, MCP tool server)
|
||||
### CLI Package (`apps/cli/`)
|
||||
Published as `@keygraph/shannon` on npm. Contains only Docker orchestration logic — no Temporal SDK, business logic, or prompts. Bundled with tsdown for single-file ESM output.
|
||||
|
||||
- `apps/cli/src/index.ts` — CLI dispatcher (`setup`, `start`, `stop`, `logs`, `workspaces`, `status`, `build`, `update`, `uninstall`, `info`)
|
||||
- `apps/cli/src/index.ts` — CLI dispatcher (`setup`, `start`, `stop`, `logs`, `workspaces`, `status`, `build`, `uninstall`, `info`)
|
||||
- `apps/cli/src/mode.ts` — Auto-detection: local mode if `SHANNON_LOCAL=1` env var is set
|
||||
- `apps/cli/src/docker.ts` — Compose lifecycle, image pull/build, ephemeral `docker run` worker spawning
|
||||
- `apps/cli/src/home.ts` — State directory management (`~/.shannon/` for npx, `./` for local)
|
||||
|
||||
@@ -247,7 +247,6 @@ shannon workspaces
|
||||
|
||||
# Image management
|
||||
shannon build --no-cache # local only — rebuild worker image
|
||||
shannon update # npx only — pull latest image from Docker Hub
|
||||
```
|
||||
|
||||
### Workspaces and Resuming
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* `shannon update` command — pull the worker image matching the current CLI version.
|
||||
*/
|
||||
|
||||
import { pullImage } from '../docker.js';
|
||||
|
||||
export function update(version: string): void {
|
||||
pullImage(version);
|
||||
console.log('Update complete.');
|
||||
}
|
||||
@@ -292,22 +292,6 @@ export function stopInfra(clean: boolean): void {
|
||||
execFileSync('docker', args, { stdio: 'inherit' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull the worker image matching the current CLI version.
|
||||
*/
|
||||
export function pullImage(version: string): void {
|
||||
const image = getWorkerImage(version);
|
||||
console.log(`Pulling ${image}...`);
|
||||
try {
|
||||
execFileSync('docker', ['pull', image], { stdio: 'inherit' });
|
||||
} catch {
|
||||
console.error(`\nERROR: Failed to pull ${image}`);
|
||||
console.error('Check https://hub.docker.com/r/keygraph/shannon for available tags.');
|
||||
process.exit(1);
|
||||
}
|
||||
pruneOldImages(version);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove old keygraph/shannon images that don't match the current version.
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,6 @@ import { start } from './commands/start.js';
|
||||
import { status } from './commands/status.js';
|
||||
import { stop } from './commands/stop.js';
|
||||
import { uninstall } from './commands/uninstall.js';
|
||||
import { update } from './commands/update.js';
|
||||
import { workspaces } from './commands/workspaces.js';
|
||||
import { getMode } from './mode.js';
|
||||
import { displaySplash } from './splash.js';
|
||||
@@ -58,7 +57,6 @@ Usage:${
|
||||
? `
|
||||
${prefix} build [--no-cache] Build worker image`
|
||||
: `
|
||||
${prefix} update Pull latest image
|
||||
${prefix} uninstall Remove ~/.shannon/ and all data`
|
||||
}
|
||||
${prefix} info Show splash screen
|
||||
@@ -218,9 +216,6 @@ switch (command) {
|
||||
case 'build':
|
||||
build(args.includes('--no-cache'));
|
||||
break;
|
||||
case 'update':
|
||||
update(getVersion());
|
||||
break;
|
||||
case 'uninstall':
|
||||
if (getMode() === 'local') {
|
||||
console.error('ERROR: uninstall is only available in npx mode.');
|
||||
|
||||
Reference in New Issue
Block a user