A Rust CLI tool that lets you delegate development tasks to AI agents running in sandboxed Docker or Podman environments. Get back git branches for human review.
Currently Claude Code and Codex coding agents are supported.
TSK enables a "lead engineer + AI team" workflow:
- Assign tasks to AI agents using task type templates to automate prompt boilerplate and enable powerful multi-agent workflows
- Agents work autonomously in parallel isolated containers with file system and network isolation
- Get git branches back with their changes for review
- Review and merge using your normal git workflow
Think of it as having a team of engineers who work independently and submit pull requests for review.
- Rust - Rust toolchain and Cargo
- Docker or Podman - Container runtime
- Git - Version control system
- One of the supported coding agents:
- Claude Code
- Codex
- Help us support more!
# Install using cargo
cargo install tsk-ai
# Or build from source!
gh repo clone dtormoen/tsk
cd tsk
cargo install --path .Claude Code users: Install TSK skills to teach Claude how to use TSK commands directly in your conversations and help you configure your projects for use with TSK:
/plugin marketplace add dtormoen/tsk
/plugin install tsk-help@dtormoen/tsk
/plugin install tsk-config@dtormoen/tsk
/plugin install tsk-add@dtormoen/tskSee Claude Code Skills Marketplace for more details.
TSK can be used in multiple ways. Here are some of the main workflows to get started. Try testing these in the TSK repository!
Start up sandbox with an interactive shell so you can work interactively with a coding agent. This is similar to a git worktrees workflow, but provides stronger isolation. claude is the default coding agent, but you can also specify --agent codex to use codex.
tsk shellThe tsk shell command will:
- Make a copy of your repo
- Create a new git branch for you to work on
- Start a proxy to limit internet access
- Build and start a container with your stack (go, python, rust, etc.) and agent (default: claude) installed
- Drop you into an interactive shell
After you exit the interactive shell (ctrl-d or exit), TSK will save any work you've done as a new branch in your original repo.
This workflow is really powerful when used with terminal multiplexers like tmux or zellij. It allows you to start multiple agents that are working on completely isolated copies of your repository with no opportunity to interfere with each other or access resources outside of the container.
TSK has flags that help you avoid repetitive instructions like "make sure unit tests pass", "update documentation", or "write a descriptive commit message". Consider this command which immediately kicks off an autonomous agent in a sandbox to implement a new feature:
tsk run --type feat --name greeting --description "Add a greeting to all TSK commands."Some important parts of the command:
--typespecifies the type of task the agent is working on. Using TSK built-in tasks or writing your own can save a lot of boilerplate. Check out feat.md for thefeattype and templates for all task types.--namewill be used in the final git branch to help you remember what task the branch contains.--descriptionis used to fill in the{{description}}placeholder in feat.md.
Similar to tsk shell, the agent will run in a sandbox so it will not interfere with any ongoing work and will create a new branch in your repository in the background once it is done working.
After you try this command out, try out these next steps:
- Add the
--editflag to edit the full prompt that is sent to the agent. - Add a custom task type. Use
tsk template listto see existing task templates and where you can add your own custom tasks.- See the custom templates used by TSK for inspiration.
The TSK server allows you to have a single process that manages parallel task execution so you can easily background agents working. First, we start the server set up to handle up to 4 tasks in parallel:
tsk server start --workers 4Now, in another terminal window, we can quickly queue up multiple tasks:
# Add a task. Notice the similarity to the `tsk run` command
tsk add --type doc --name tsk-architecture --description "Tell me how TSK works"
# Look at the task queue. Your task `tsk-architecture` should be present in the list
tsk list
# Add another task. Notice the short flag names
tsk add -t feat -n greeting -d "Add a silly robot greeting to every TSK command"
# Now there should be two running tasks
tsk list
# Wait for the tasks to finish. After they complete, look at the two new branches
git branch --format="%(refname:short) - %(subject) (%(committerdate:relative))"After you try this command out, try these next steps:
- Add tasks from multiple repositories in parallel
- Start up multiple agents at once
- Adding
--agent codexwill usecodexto perform the task - Adding
--agent codex,claudewill havecodexandclaudedo the task in parallel with the same environment and instructions so you can compare agent performance - Adding
--agent claude,claudewill haveclaudedo the task twice. This can be useful for exploratory changes to get ideas quickly
- Adding
Chain tasks together with --parent (-p) so a child task starts from where its parent left off:
# First task: set up the foundation
tsk add -t feat -n add-api -d "Add a REST API endpoint for users"
# Check the task list to get the task ID
tsk list
# Second task: chain it to the first (replace <taskid> with the parent's ID)
tsk add -t feat -n add-tests -d "Add integration tests for the users API" --parent <taskid>Child tasks wait for their parent to complete, then start from the parent's final commit. tsk list shows these tasks as WAITING. If a parent fails, its children are automatically marked as FAILED. Chains of any length (A → B → C) are supported.
Let's create a very basic way to automate working on GitHub issues:
# First create the tsk template configuration directory
mkdir -p ~/.config/tsk/templates
# Create a very simple template. Notice the use of the "{{DESCRIPTION}}" placeholder
cat > ~/.config/tsk/templates/issue-bot.md << 'EOF'
Solve the GitHub issue below. Make sure it is tested and write a descriptive commit
message describing the changes after you are done.
{{DESCRIPTION}}
EOF
# Make sure tsk sees the new `issue-bot` task template
tsk template list
# Pipe in some input to start the task
# Piped input automatically replaces the {{DESCRIPTION}} placeholder
gh issue view <issue-number> | tsk add -t issue-bot -n fix-my-issueNow it's easy to solve GitHub issues with a simple task template. Try this with code reviews as well to easily respond to feedback.
Create, manage, and monitor tasks assigned to AI agents.
tsk run- Execute a task immediatelytsk shell- Start a sandbox container with an interactive shelltsk add- Queue a task (supports--parent <taskid>for task chaining)tsk list- View task status and branchestsk clean- Clean up completed taskstsk delete <task-id>...- Delete one or more taskstsk retry <task-id>...- Retry one or more tasks
Manage the TSK server daemon for parallel task execution. The server automatically cleans up completed and failed tasks older than 7 days.
tsk server start- Start the TSK server daemontsk server stop- Stop the running TSK server
Build container images and manage task templates.
tsk docker build- Build required container imagestsk template list- View available task type templates and where they are installed
Run tsk help or tsk help <command> for detailed options.
TSK has 3 levels of configuration in priority order:
- Project level in the
.tskfolder local to your project - User level in
~/.config/tsk - Built-in configurations
Each configuration directory can contain:
templates: A folder of task template markdown files which can be used via the-t/--typeflag
TSK can be configured at two levels:
- User-level:
~/.config/tsk/tsk.toml— global settings, defaults, and per-project overrides - Project-level:
.tsk/tsk.tomlin your project root — shared project defaults (checked into version control)
Both levels use the same shared config shape. The project-level config only contains shared settings (no container_engine, [server], or [project.<name>] sections).
User-level config (~/.config/tsk/tsk.toml):
# Container engine (top-level setting, user-only)
container_engine = "docker" # "docker" (default) or "podman"
# Server daemon configuration (user-only)
[server]
auto_clean_enabled = true # Automatically clean old tasks (default: true)
auto_clean_age_days = 7.0 # Minimum age in days before cleanup (default: 7.0)
# Default settings for all projects (showing built-in defaults)
[defaults]
agent = "claude" # AI agent: "claude" or "codex"
stack = "default" # Tech stack (auto-detected from project files)
memory_gb = 12.0 # Container memory limit in GB
cpu = 8 # Number of CPUs
dind = false # Enable Docker-in-Docker support
git_town = false # Enable git-town parent branch tracking
# Project-specific overrides (matches directory name)
[project.my-go-service]
stack = "go"
memory_gb = 24.0
cpu = 16
setup = '''
USER root
RUN apt-get update && apt-get install -y libssl-dev pkg-config
USER agent
'''
host_ports = [5432, 6379] # Forward host ports to containers
volumes = [
# Bind mount: share host directories with containers (supports ~ expansion)
{ host = "~/.cache/go-mod", container = "/go/pkg/mod" },
# Named volume: container-managed persistent storage (prefixed with tsk-)
{ name = "go-build-cache", container = "/home/agent/.cache/go-build" },
# Read-only mount: provide artifacts without modification risk
{ host = "~/debug-logs", container = "/debug-logs", readonly = true }
]
env = [
{ name = "DB_PORT", value = "5432" },
{ name = "REDIS_PORT", value = "6379" },
]Project-level config (.tsk/tsk.toml in project root):
# Project defaults shared via version control
stack = "rust"
memory_gb = 16.0
host_ports = [5432]
setup = '''
USER root
RUN apt-get update && apt-get install -y cmake
USER agent
'''
[stack_config.rust]
setup = '''
RUN cargo install cargo-nextest
'''The setup field injects Dockerfile commands at the project layer position in the Docker image build. Use it for project-specific build dependencies. stack_config.<name>.setup and agent_config.<name>.setup similarly inject content at the stack and agent layer positions, and can define entirely new stacks or agents (e.g., stack_config.scala.setup lets you use stack = "scala"). Config-defined layers take priority over embedded Docker layers. Setup commands run as the agent user by default — use USER root for operations that require elevated privileges (e.g., apt-get install) and always switch back to USER agent afterwards.
Volume mounts are particularly useful for:
- Build caches: Share Go module cache (
/go/pkg/mod) or Rust target directories to speed up builds - Persistent state: Use named volumes for build caches that persist across tasks
- Read-only artifacts: Mount debugging artifacts, config files, or other resources without risk of modification
Environment variables (env) let you pass configuration to task containers, such as database URLs or API keys. To connect to host services forwarded through the proxy, use the TSK_PROXY_HOST environment variable (set automatically by TSK) as the hostname.
The container engine can also be set per-command with the --container-engine flag (available on run, shell, retry, server start, and docker build).
Host ports (host_ports) expose host services to task containers. Agents connect to $TSK_PROXY_HOST:<port> to reach services running on your host machine (e.g., local databases or dev servers). The TSK_PROXY_HOST environment variable is automatically set by TSK to the correct proxy container hostname.
When git_town is enabled, TSK integrates with git-town by setting the parent branch metadata on task branches, allowing git-town commands like git town sync to work correctly with TSK-created branches.
Configuration priority: CLI flags > user [project.<name>] > project .tsk/tsk.toml > user [defaults] > auto-detection > built-in defaults
Settings in [defaults], [project.<name>], and .tsk/tsk.toml share the same shape. Scalars use first-set in priority order. Lists (volumes, env, host_ports) combine across layers, with higher-priority winning on conflicts (same container path, same env var name, same port). stack_config/agent_config maps combine all names; for the same name, higher-priority replaces the entire config.
Each TSK sandbox container image has 4 main parts:
- A base dockerfile that includes the OS and a set of basic development tools e.g.
git - A
stacksnippet that defines language specific build steps. See: - An
agentsnippet that installs an agent, e.g.claudeorcodex. - A
projectsnippet that defines project specific build steps (applied last for project-specific customizations). This does nothing by default, but can be used to add extra build steps for your project.
It is very difficult to make these images general purpose enough to cover all repositories. You may need some special customization. If you use Claude Code, the tsk-config skill can walk you through configuring TSK's Docker layers for your project (see Claude Code Skills Marketplace for installation). Otherwise, the recommended approach is to use setup, stack_config, and agent_config fields in your tsk.toml to inject custom Dockerfile commands (see Configuration File above).
See dockerfiles for the built-in dockerfiles.
You can run tsk docker build --dry-run to see the dockerfile that tsk will dynamically generate for your repository.
See the Docker Builds Guide for a more in-depth walk through, and the Network Isolation Guide for details on how TSK secures agent network access.
I'm working on improving this part of tsk to be as seamless and easy to set up as possible, but it's still a work in progress. I welcome all feedback on how to make this easier and more intuitive!
Templates are simply markdown files that get passed to agents. TSK additionally adds a convenience {{description}} placeholder that will get replaced by anything you pipe into tsk or pass in via the -d/--description flag.
To create good templates, I would recommend thinking about repetitive tasks that you need agents to do within your codebase like "make sure the unit tests pass", "write a commit message", etc. and encode those in a template file. There are many great prompting guides out there so I'll spare the details here.
TSK uses Squid as a forward proxy to control network access from task containers. You can customize the proxy configuration to allow access to specific services or URLs needed by your project.
Inline configuration in tsk.toml (recommended):
[defaults]
squid_conf = '''
http_port 3128
acl allowed_domains dstdomain .example.com .myapi.dev
http_access allow allowed_domains
http_access deny all
'''File-based configuration (path reference):
[defaults]
squid_conf_path = "~/.config/tsk/squid.conf"
# Or in project-level .tsk/tsk.toml (path relative to project root):
# squid_conf_path = ".tsk/squid.conf"Inline squid_conf takes priority over squid_conf_path. See the default TSK squid.conf as a starting point.
Per-configuration proxy instances: Tasks with different proxy configurations (different host_ports or squid_conf) automatically get separate proxy containers. Tasks with identical proxy config share the same proxy. Proxy containers are named tsk-proxy-{fingerprint} where the fingerprint is derived from the proxy configuration.
TSK uses the following directories for storing data while running tasks:
- ~/.local/share/tsk/tasks.db: SQLite database for task queue and task definitions
- ~/.local/share/tsk/tasks/: Task directories that get mounted into sandboxes when the agent runs. They contain:
- /repo: The repo copy that the agent operates on
- /output: Directory containing a log file with the agent's actions
- /instructions.md: The instructions that were passed to an agent
These default paths follow XDG conventions. You can override them with TSK-specific environment variables without affecting other XDG-aware software. Like XDG variables, these specify the base directory; TSK appends /tsk automatically:
TSK_DATA_HOME- overridesXDG_DATA_HOMEfor TSK (default:~/.local/share)TSK_RUNTIME_DIR- overridesXDG_RUNTIME_DIRfor TSK (default:/tmp)TSK_CONFIG_HOME- overridesXDG_CONFIG_HOMEfor TSK (default:~/.config)
This repository includes a Claude Code skills marketplace with TSK-specific skills that teach Claude how to use TSK commands. To install:
# Add the marketplace in Claude Code
/plugin marketplace add dtormoen/tsk
# Install a skill (e.g. tsk-help, tsk-config, tsk-add)
/plugin install tsk-help@dtormoen/tskSkills follow the Agent Skills open standard. See the Skills Marketplace Guide for details on available skills, manual installation, and contributing new skills.
This project uses:
cargo testfor running testsjust precommitfor full CI checksjust integration-testfor stack layer integration tests (requires Docker/Podman)- See CLAUDE.md for development guidelines
MIT License - see LICENSE file for details.
