@scopeide/cli 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +37 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -81,11 +81,13 @@ IMPORTANT: Protect secrets and credentials.
|
|
|
81
81
|
|
|
82
82
|
// ../../packages/shared/src/plans.ts
|
|
83
83
|
var PLANS = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
// Credits are priced off our provider cost (about $0.10 per 1M tokens on every model, multiplier 1), keeping >= 3x margin at full use.
|
|
85
|
+
// Weekly cap = 40% and 5-hour cap = 12% of the month, so a busy day is fine but one account cannot drain a month in an afternoon.
|
|
86
|
+
free: { label: "Free", priceUsd: 0, monthlyCredits: 2e6, weeklyCredits: 8e5, fiveHourCredits: 25e4, providers: ["deepseek", "openrouter", "groq", "custom", "mock"] },
|
|
87
|
+
go: { label: "Go", priceUsd: 5, monthlyCredits: 15e6, weeklyCredits: 6e6, fiveHourCredits: 18e5, providers: ["deepseek", "openai", "openrouter", "groq", "custom", "mock"] },
|
|
88
|
+
goat: { label: "Goat", priceUsd: 10, monthlyCredits: 3e7, weeklyCredits: 12e6, fiveHourCredits: 36e5, providers: ["deepseek", "openai", "anthropic", "openrouter", "groq", "custom", "mock"] },
|
|
89
|
+
pro: { label: "Pro", priceUsd: 20, monthlyCredits: 6e7, weeklyCredits: 24e6, fiveHourCredits: 72e5, providers: ["deepseek", "openai", "anthropic", "openrouter", "groq", "custom", "mock"] },
|
|
90
|
+
max10: { label: "Max", priceUsd: 100, monthlyCredits: 3e8, weeklyCredits: 12e7, fiveHourCredits: 36e6, providers: ["deepseek", "openai", "anthropic", "openrouter", "groq", "custom", "mock"] }
|
|
89
91
|
};
|
|
90
92
|
var PLAN_IDS = Object.keys(PLANS);
|
|
91
93
|
var WEEKLY_SHARE_OF_MONTH = 7 / 30;
|
|
@@ -496,13 +498,18 @@ var PARTS_DEFAULTS = {
|
|
|
496
498
|
intro: "",
|
|
497
499
|
searchPlaceholder: "Search the docs",
|
|
498
500
|
sections: [
|
|
499
|
-
{ id: "intro", category: "
|
|
500
|
-
{ id: "
|
|
501
|
-
{ id: "
|
|
502
|
-
{ id: "
|
|
503
|
-
{ id: "
|
|
504
|
-
{ id: "
|
|
505
|
-
{ id: "
|
|
501
|
+
{ id: "intro", category: "Overview", title: "Introduction", badge: "", body: "# Introduction\n\n{name} is an AI coding agent. It reads your project, makes small verified edits, runs your tests, and remembers your conventions. You can use it in two ways, with the same account, plan and credits:\n\n| | Desktop app | CLI |\n|---|---|---|\n| What it is | A full code editor with the agent built in | A terminal tool you run in any project |\n| Best for | Day-to-day coding with inline diffs, a terminal and Git in one window | Terminals, SSH sessions, scripts and CI |\n| Install | [Download](/download) for macOS, Windows or Linux | `{install}` |\n| Start | Open the app and sign in | `{bin} login`, then `{bin}` |\n\nNot sure which to pick? Start with the **Desktop app** if you want an editor, or the **CLI** if you live in the terminal. You can use both.\n\n- Works with the models available on your plan (see **Models**).\n- Every request costs *credits*; your plan includes a monthly allowance (see **Plans** and **Credits**).\n- Your code is sent only to the model provider that answers your request.\n" },
|
|
502
|
+
{ id: "download", category: "Desktop App", title: "Install the app", badge: "App", body: "# Install the desktop app\n\n1. Open the [download page](/download) and pick your system (it highlights the one it detects).\n2. Install it. On **macOS**, open the `.dmg` and drag {name} to Applications (Apple Silicon or Intel). On **Windows**, run the `.exe` installer (x64 or ARM64). On **Linux**, use the `.AppImage` (any distro) or the `.deb` (Debian / Ubuntu).\n3. Open {name} and choose **Sign in**. Your browser opens, you approve the device, and the app is connected to your account.\n4. Use **File > Open Folder** to open a project. The chat panel on the right is where you talk to the agent.\n\nRequirements: macOS 12 or later, Windows 10 or later, or a 64-bit Linux with glibc 2.31+ (Ubuntu 20.04+).\n" },
|
|
503
|
+
{ id: "desktop-overview", category: "Desktop App", title: "Using the app", badge: "App", body: "# Using the app\n\nThe window has three areas:\n\n- **Left, Explorer**: your files, Git changes (stage, commit, revert) and chat threads.\n- **Center, editor**: tabs, syntax highlighting for 25+ languages, search and replace, and an integrated terminal (`Cmd/Ctrl+J`).\n- **Right, agent chat**: describe a task. Select code in the editor and choose **Add selection to chat** to give the agent exact context. Attach images and use `@` to mention files.\n\n## Reviewing the agent's edits\n\nWhen the agent changes a file, it opens in the editor and the changes show **inline** against the previous version. Each chunk has **Accept** and **Reject**, plus **Accept all** and **Reject all**. Shell commands the agent wants to run ask for your approval first.\n\n## Choosing a model\n\nPick a model from the chat panel. The list shows the models on your plan; a model's credit multiplier decides how fast it uses your allowance (see **Models**).\n" },
|
|
504
|
+
{ id: "desktop-shortcuts", category: "Desktop App", title: "Keyboard shortcuts", badge: "App", body: "# Keyboard shortcuts\n\nUse `Cmd` on macOS and `Ctrl` on Windows and Linux.\n\n| Shortcut | Action |\n|---|---|\n| `Cmd/Ctrl+Shift+P` | Command palette |\n| `Cmd/Ctrl+P` | Quick open a file (`file:42` jumps to a line) |\n| `Cmd/Ctrl+Shift+F` | Search and replace across files |\n| `Cmd/Ctrl+O` | Open folder |\n| `Cmd/Ctrl+S` | Save |\n| `Cmd/Ctrl+B` | Toggle sidebar |\n| `Cmd/Ctrl+Alt+B` | Toggle chat |\n| `Cmd/Ctrl+J` | Toggle terminal |\n| `Cmd/Ctrl+Shift+V` | Markdown preview |\n| `Cmd/Ctrl+,` | Settings |\n" },
|
|
505
|
+
{ id: "desktop-ssh", category: "Desktop App", title: "Remote SSH", badge: "App", body: "# Remote development over SSH\n\nWork on a server the way you work locally. Click the **`><`** button at the left of the status bar, or run **Remote-SSH: Connect to Host** from the command palette.\n\n1. Pick a host from your `~/.ssh/config`, or type `user@host:port`.\n2. Choose the folder to open on the server.\n3. The Explorer, editor, Git, terminal and the **AI agent** all run on the server. The interface and the model stay on your machine.\n\nYour SSH keys, agent and `ProxyJump` settings are used first; you are asked for a password only if they fail. The server needs a POSIX shell, `git`, `find`, `grep`, `xargs` and `base64`. Project MCP servers, hooks and `{dir}` skills files are not available in remote workspaces.\n" },
|
|
506
|
+
{ id: "quickstart", category: "CLI", title: "Install & quickstart", badge: "CLI", body: '# CLI quickstart\n\nRequires Node.js 22 or later.\n\n1. Install the CLI:\n\n```\n{install}\n```\n\n2. Log in (opens your browser):\n\n```\n{bin} login\n```\n\n3. Check the setup:\n\n```\n{bin} doctor\n```\n\n4. Start a session in your project:\n\n```\ncd your-project && {bin}\n```\n\nOr run one prompt and exit:\n\n```\n{bin} -p "add input validation to the signup form"\n```\n\nFor scripts and CI, create an API key under **API Keys** in your dashboard and set it as `SCOPE_API_KEY` instead of logging in.\n' },
|
|
507
|
+
{ id: "run-modes", category: "CLI", title: "Run modes", badge: "CLI", body: '# Run modes\n\n- **Interactive** (`{bin}` or `{bin} chat`): a conversation in your terminal. The agent asks before editing files or running commands.\n- **Headless** (`{bin} -p "..."`): one prompt, then exit. Good for scripts and CI. Add `--output-format json` for machine-readable output. Piped input works too: `cat error.log | {bin} -p "why did this fail?"`.\n- **Plan mode** (`--plan`): read-only exploration; prints a step-by-step plan and changes nothing.\n- **Auto-approve** (`--yolo`): runs tools without asking. Dangerous shell commands are still blocked.\n- **Cascade** (`--cascade`): start with the cheap default model and escalate to a stronger one only if the attempt fails. Combine with `--verify "pnpm test"`.\n- **Resume** (`-c` / `-r [id]`): continue the latest session or pick one.\n' },
|
|
508
|
+
{ id: "cli-reference", category: "CLI", title: "Commands", badge: "CLI", body: '# Commands\n\n| Command | What it does |\n|---|---|\n| `{bin}` / `{bin} chat` | interactive session in the current directory |\n| `{bin} -p "<prompt>"` | run one prompt headlessly |\n| `{bin} login` / `logout` | log in via browser / remove the stored token |\n| `{bin} models [id]` | list models on your plan, or set the default |\n| `{bin} usage` | show remaining credits |\n| `{bin} init` | create `{dir}/skills.md` and `memory.md` |\n| `{bin} skills list` / `add "<rule>"` | project rules applied to every run |\n| `{bin} taste push` / `pull <ns/name>` / `list` | share skills and memory with your team |\n| `{bin} mcp list` / `add` / `remove` / `trust` | MCP servers the agent can use |\n| `{bin} hooks list` / `trust` | PreToolUse / PostToolUse hooks |\n| `{bin} doctor` | check node, git, login, MCP and hooks |\n\n## Options for runs\n\n- `--model <id>`: pick a model (see **Models**)\n- `--max-steps <n>`, `--max-tokens <n>`: limits for one run\n- `--effort low|high`, `--cascade`, `--escalate-to <id>`, `--verify <cmd>`\n- `--plan`, `--yolo`, `-c`, `-r [id]`\n- `--output-format text|json|stream-json`\n- `--append-system-prompt <text>`: extra instructions for this run\n' },
|
|
509
|
+
{ id: "cli-slash", category: "CLI", title: "Slash commands & keys", badge: "CLI", body: "# Slash commands and keys\n\nType these inside an interactive session. Press `Tab` to complete.\n\n| Command | What it does |\n|---|---|\n| `/clear`, `/new` | start a fresh session with clean context |\n| `/model [id]`, `/models` | switch the active model, or list models on your plan |\n| `/status` | session info, plan and model |\n| `/context` | token usage in the current context |\n| `/skills`, `/memory` | browse or add project skills and memory |\n| `/usage` | credits, requests and token usage |\n| `/effort [level]` | set the reasoning effort |\n| `/copy`, `/export [format]` | copy the last answer, or export the transcript |\n| `/init` | create `{dir}/skills.md` and `memory.md` |\n| `/exit`, `/quit` | leave the session |\n\n## Keys\n\n- `@path`: attach a file to your message, for example `@src/index.ts`\n- `!cmd`: run a shell command directly, for example `!git status`\n- `Esc`: interrupt the current turn. `Up` / `Down`: prompt history. `Ctrl+D`: exit on an empty prompt.\n" },
|
|
510
|
+
{ id: "skills", category: "Customize", title: "Skills & memory", badge: "App + CLI", body: '# Skills and memory\n\nPut your conventions in `{dir}/skills.md`. It is plain text, lives in your repository, and is loaded into every session in both the app and the CLI, so the whole team shares it.\n\n```\n{bin} skills add "Use pnpm, not npm"\n{bin} skills list\n```\n\n`{dir}/memory.md` holds notes the agent should remember about the project. Share both with `{bin} taste push` and `{bin} taste pull <namespace>/<name>`.\n' },
|
|
511
|
+
{ id: "mcp", category: "Customize", title: "MCP servers", badge: "App + CLI", body: "# MCP servers\n\nConnect tools such as databases or issue trackers through the Model Context Protocol. Add them with the CLI; the desktop app uses the same project configuration.\n\n```\n{bin} mcp add files npx -y @modelcontextprotocol/server-filesystem .\n{bin} mcp list\n```\n\nServers are stored in `{dir}/mcp.json`. Review and approve a project's servers with `{bin} mcp trust` before the agent uses them.\n" },
|
|
512
|
+
{ id: "hooks", category: "Customize", title: "Hooks", badge: "App + CLI", body: "# Hooks\n\nHooks are commands that run before or after a tool call, for example to block risky commands or run a formatter. They live in `{dir}/hooks.json`.\n\n```\n{bin} hooks list\n{bin} hooks trust\n```\n" },
|
|
506
513
|
{ id: "plans", category: "Plans & Billing", title: "Plans", badge: "", body: "# Plans\n\nCurrent plans, straight from the billing system:\n\n{{plans}}\n\nUpgrade, downgrade or cancel from **Billing** in your dashboard.\n" },
|
|
507
514
|
{ id: "credits", category: "Plans & Billing", title: "Credits & limits", badge: "", body: "# Credits and limits\n\nEach request uses **credits** = (prompt tokens + completion tokens) x the model's credit multiplier. Your plan includes a monthly allowance; it resets with your billing period. Coupon codes add bonus credits on top.\n\nTo keep usage even, every plan also has a **5-hour** and a **weekly** cap. They are rolling windows: credits you used free up gradually as they age out, so there is no single reset time. Check `{bin} usage` or the **Usage** page for what is left.\n\nWhen a cap is reached, requests return `402` (`credits_exhausted`, `weekly_limit` or `five_hour_limit`) with a `retry-after` header, until credits free up or you upgrade.\n\n{{limits}}\n" },
|
|
508
515
|
{ id: "deals", category: "Plans & Billing", title: "Deals", badge: "", body: "# Deals\n\n{{deals}}\n" },
|
|
@@ -757,19 +764,19 @@ var SITE_DEFAULTS = {
|
|
|
757
764
|
pricingHero: {
|
|
758
765
|
pill: "// Transparent Pricing.",
|
|
759
766
|
title: "A plan for every kind of code. Pick yours.",
|
|
760
|
-
text: "
|
|
761
|
-
checks: ["Cancel anytime", "Never trained on your code"]
|
|
767
|
+
text: "Every model on every plan. Higher plans simply give you more tokens.",
|
|
768
|
+
checks: ["Cancel anytime", "Never trained on your code", "Paid plans launching soon"]
|
|
762
769
|
},
|
|
763
770
|
pricingTabs: [
|
|
764
771
|
{
|
|
765
772
|
id: "individuals",
|
|
766
773
|
label: "For Individuals",
|
|
767
774
|
cards: [
|
|
768
|
-
card({ planId: "free", badge: "No card needed", description: "Try Scope
|
|
769
|
-
card({ planId: "go", badge: "Entry",
|
|
770
|
-
card({ planId: "goat", badge: "Most Popular", popular: true, description: "Best value for
|
|
771
|
-
card({ planId: "pro", description: "For
|
|
772
|
-
card({ planId: "max10", description: "For
|
|
775
|
+
card({ planId: "free", badge: "No card needed", usage: "1 credit = 1 token on every model", description: "Try Scope with every model and a monthly starter allowance.", features: ["2M credits every month", "All models included", "Desktop app, CLI and API", "Community support"], ctaLabel: "Start Free" }),
|
|
776
|
+
card({ planId: "go", badge: "Entry", usage: "1 credit = 1 token on every model", description: "A steady daily driver for side projects and learning.", features: ["15M credits every month", "All models included", "Usage analytics", "Community & email support"] }),
|
|
777
|
+
card({ planId: "goat", badge: "Most Popular", popular: true, usage: "1 credit = 1 token on every model", description: "Best value for developers who code every day.", features: ["30M credits every month", "All models included", "Higher rate limits", "Priority email support"] }),
|
|
778
|
+
card({ planId: "pro", usage: "1 credit = 1 token on every model", description: "For professionals shipping complex apps every day.", features: ["60M credits every month", "All models included", "Team skills syncing ({dir}/skills.md)", "Higher rate limits"] }),
|
|
779
|
+
card({ planId: "max10", usage: "1 credit = 1 token on every model", description: "For heavy agent workloads, agencies and small teams.", features: ["300M credits every month", "All models included", "Highest rate limits", "Direct support channel"] })
|
|
773
780
|
]
|
|
774
781
|
},
|
|
775
782
|
{
|
|
@@ -802,6 +809,8 @@ var SITE_DEFAULTS = {
|
|
|
802
809
|
title: "Questions, answered.",
|
|
803
810
|
text: "Everything that usually comes up before a developer or team installs.",
|
|
804
811
|
items: [
|
|
812
|
+
{ q: "How do credits work?", a: "1 credit equals 1 token (prompt plus completion) on every model. Tokens served from the provider's cache use a quarter of a credit. Your allowance resets every month, and weekly and 5-hour limits keep usage smooth." },
|
|
813
|
+
{ q: "Can I upgrade today?", a: "Paid plans are opening soon. Everyone starts on the Free plan, and we will announce here when upgrades are available." },
|
|
805
814
|
{ q: "Is my code used for training?", a: "No. {name} never trains foundational models on your code. All codebase indexing and interactions remain strictly private." },
|
|
806
815
|
{ q: "How do teams share conventions and skills?", a: "Conventions live in your repository in {dir}/skills.md. Because they are plain text files committed to your repository, team members stay in sync through regular Git commits." }
|
|
807
816
|
]
|
|
@@ -2980,7 +2989,15 @@ async function models(modelToSet) {
|
|
|
2980
2989
|
}
|
|
2981
2990
|
const r = await api("/v1/models");
|
|
2982
2991
|
console.log(cs("cli.commands.models_on_your_0_plan", "Models on your {0} plan:", r.plan));
|
|
2983
|
-
|
|
2992
|
+
const activeDefault = cfg.defaultModel || r.default;
|
|
2993
|
+
for (const m of r.data) {
|
|
2994
|
+
const isDef = m.id === activeDefault;
|
|
2995
|
+
const isServerDef = m.id === r.default;
|
|
2996
|
+
const tag = isServerDef ? " [default]" : "";
|
|
2997
|
+
console.log(cs("cli.commands.0_1_2_x_3", "{0} {1} x{2} credits/token {3}", isDef ? "*" : " ", (m.id + tag).padEnd(32), m.multiplier, m.vision ? "[images]" : ""));
|
|
2998
|
+
}
|
|
2999
|
+
if (r.default) console.log(`
|
|
3000
|
+
Server default: ${r.default}`);
|
|
2984
3001
|
if (r.data.some((m) => m.vision)) console.log(cs("cli.commands.images_can_read_images_attach", "\n[images] = can read images (attach with @file.png, drag a file in, or Ctrl+V)"));
|
|
2985
3002
|
if (!r.data.length) console.log(cs("cli.commands.no_models_available_the_server", "No models are available for your account right now."));
|
|
2986
3003
|
}
|