Command line and tools
Run Maxtkn in a CI pipeline, call the TypeScript SDK from your own scripts, and schedule unattended runs with the scheduler built into your operating system.
Last updated
The action runs one request on a CI runner, uploads the event log and puts the walkthrough in the step summary. The step fails with the command line’s exit code.
- uses: ./.github/actions/maxtkn
with:
prompt: "Fix the failing tests"
model: claude-sonnet-5-5
verify: "true"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}| Input | Meaning | Default |
|---|---|---|
prompt | What to do. Required. | |
project | The project folder, relative to the workspace. | . |
team | Built-in team id. | squad |
model | demo (offline), a claude-… model, or any model the endpoint serves. | demo |
access | ask, auto-edit or full. | auto-edit |
yes-to | Space-separated tools allowed to run without asking, such as run_command run_tests. | none |
verify | true to run the project’s own checks afterwards. | false |
check | true to run .maxtkn/acceptance.json afterwards. | false |
trust | true to let the project’s hooks, MCP servers and skill scripts run. Leave it false for pull requests from forks. | false |
timeout | Seconds before the run is cancelled. | 1800 |
base-url, api-key-env | An OpenAI-compatible endpoint, and the name of the variable that holds its key. | none |
node-version | Node version used to build and run the command line. | 20 |
It has two outputs: exit-code and summary (how the run ended, in one line). Keys come from the environment only, never from an input.
The SDK is the same engine as the command line, as a function for your own scripts and tests. It streams events as the team works and resolves with the outcome.
import { run } from './sdk';
const { events, result } = run({
prompt: 'add a contact form',
project: '.',
team: 'solo',
model: 'demo',
});
for await (const ev of events) {
if (ev.kind === 'file_change') console.log('changed', ev.data.path);
}
const outcome = await result;
console.log(outcome.summary);
process.exitCode = outcome.exitCode;goal (with maxRounds) keeps working until checks pass, and worktree: true or a branch name works in an isolated copy and applies nothing.readEventLog reads a saved .maxtkn/runs log back.worktree run, the copy’s folder and branch.Scheduled tasks in the app run only while Maxtkn is open. To run a task when it is closed, open the task in Scheduled tasks and use Run even when Maxtkn is closed. It writes the command for Windows schtasks, a macOS launchd snippet or a Linux crontab line, with a Copy button. The command runs the command line with the task’s project, request, team, model and time limit, never contains a key (only the name of the variable), and uses --profile read-only unless the task works in an isolated copy, in which case it uses --worktree.
See Goals and scheduled tasks for the rules, and The maxtkn command line for every option.
Something missing or wrong? Maxtkn is early-access software and these pages change with it. The changelog lists what changed in each build.