How to connect Bash to Toolspoke

Give your Toolspoke agents a shell that runs in your project's isolated sandbox, not on your machine. Read-only file tools you can grant on their own, a full shell when you want it, and no credential to set up.

Bash toolkitRun shell commands in the project's own sandbox, or read files, list directories and search the filesystem under a narrower read-only grant.

Checked against Bash's documentation on 2026-11-25.

Toolspoke's Bash toolkit is a shell that runs in your Toolspoke project's sandbox, a container in Toolspoke's infrastructure. It doesn't touch your laptop, your files or your network. Once it's installed, any agent in the project can use it.

This guide explains what the sandbox can and can't reach, how to hand out shell access without handing out the power to delete things, and how to build an agent that answers questions about the files in it. There's no vendor account and no key, so setup takes two minutes.

Use the toolkit when:

  • a team should share one workspace, and one set of rules about who may run what;
  • you want every command recorded in an audit log, with the person behind it;
  • you want an agent to read and search files without being able to change them.

What an agent can do once it's connected

The toolkit has 7 named actions. Five of them only read:

  • sandbox_info reports the bash version, kernel, working directory, free space and which common tools are installed. An agent should call it first when unsure.
  • list_directory lists one directory, including dotfiles.
  • read_file returns a text file, or part of one from a starting line.
  • search_files searches file contents with an extended regular expression and returns path:line:text.
  • find_files finds files by name with a glob such as *.test.ts.

The other two change things:

ActionWhat it doesKind
write_fileCreates or overwrites one file, with parent directories. It can't appendWrite
run_commandRuns any shell command lineDestructive

The read actions pass your path to the shell as data, never as part of a command line. A crafted path can't make them run a command, which is what makes a read-only grant meaningful. run_command can do anything the sandbox user can, including deleting the workspace, so it's marked destructive.

What you need

  • A Toolspoke workspace, and a project to install the toolkit in.

There's no vendor account and no credential.

What runs where

This section replaces the vendor setup steps other guides have. It's what you need to know before you switch the toolkit on.

The sandbox. Each project gets its own container, built from node:22-bookworm-slim (Debian bookworm). Commands run as an unprivileged user with no sudo. Two projects never share a workspace on disk, so a file one writes isn't a file the other can read.

Files. /workspace is the only writable directory and the default working directory. Files there survive between calls while the project's sandbox stays alive. That isn't a guarantee, though: the sandbox is recreated whenever the project's set of tools changes. Keep anything that matters in git or somewhere else.

Installed tools. bash, GNU coreutils, find, grep, sed, awk, tar, curl, git, jq, python3, the PostgreSQL client and the MySQL client. That's all. apt-get install fails, because there's no root.

Network. The container can reach the public internet, so curl and git clone over HTTPS work. It can't reach private or loopback addresses. That means it can't reach your laptop's localhost, your office network or your VPN, and it can't reach Toolspoke's own database either.

No session. Every call is a fresh bash -c process. A cd, an export or a background server in one call is gone by the next. Chain things that belong together in one command, like cd app && git log -n 5.

Limits:

  • 20 seconds per command, wall clock. A longer command is killed and returns nothing. npm ci on a real project won't finish in time.
  • Output is cut off at 100,000 characters of stdout and 10,000 of stderr.
  • 512 MB of memory, unless the project has a heavier toolkit installed.
  • A command that exits non-zero comes back as an error carrying stderr, and its stdout is lost. Add 2>&1 || true when you need a failing command's output.

One quoting trap. The sandbox treats {{word}} in arguments as a placeholder, so a command or file containing a literal {{name}} is rejected with Missing CLI input name. This hits Handlebars, Jinja, Vue and Mustache templates. Ask the agent to build such files with sed or printf.

Step 1: Install the Bash toolkit in Toolspoke

  1. In Toolspoke, open the project your agents work in. Find Bash in the marketplace and add it.
  2. Leave Working directory blank to use /workspace. Set it only to pin the shell to a subdirectory, such as /workspace/repo.
CredentialBash
Working directoryoptional
/workspace
Optional. Every operation starts here and relative paths resolve against it. /workspace is the only writable directory in the sandbox, so leave this blank unless you want the shell pinned to a subdirectory of it.

sandbox_info answered. The credential works.

Save and test
The Bash toolkit's credential card in your Toolspoke project, with its real fields.

There's no credential. Toolspoke checks the sandbox by calling sandbox_info.

Step 2: Decide what agents may run

In the project's toolkit settings, Bash's actions are grouped as read, write and destructive. Each one can be switched on or off for everyone in the project. An action that's switched off can't be called, whatever the prompt says.

A sensible start: switch on the five reads and write_file, and leave run_command off until you need it. With that grant, an agent can inspect and edit files in the workspace but can't run anything.

Bash actions in your project

Agents can call 6 of 7, and 1 of those can change something.

Read
Looks, changes nothing.
  • sandbox_infoReport what this sandbox is: bash version, kernel, working directory, free space, and which of the common command-line tools are installed.
  • list_directoryList one directory in long format, including dotfiles.
  • read_fileReturn the contents of one text file, optionally from a starting line.
  • search_filesSearch file contents recursively and return matching lines as path:line:text.
  • find_filesFind files and directories by name under a directory tree, using a shell glob such as "*.test.ts".
Write
Changes something you can change back.
  • write_fileCreate or overwrite one file with the given text, creating parent directories as needed, and report the byte count written.
Delete
Removes or overrides something for good.
  • run_commandRun an arbitrary shell command line in the sandbox and return its stdout, stderr and exit code.
Try the switches. They start the way this guide suggests; nothing here changes your project.

Every call is recorded with the agent and person behind it, the request, the response, the status and the duration.

Step 3: Build an agent that uses it

In Toolspoke, create an agent and describe its job in one sentence. The builder proposes the instructions, the toolkits it needs, a schedule and where it should answer. You add or skip each one, then create the agent. Every piece stays editable afterwards.

The agent only needs the read actions, so it works with run_command switched off. It replies in the thread it was asked in, and every file it opened is in the audit log.

Try it

Ask the agent in Slack, by email or in its chat:

  • What tools are installed and how much free space is there?
  • Clone https://github.com/example/repo into /workspace and show me the last 20 commits.
  • Search /workspace/repo for TODO or FIXME and group them by file.
  • Find every *.sql file under /workspace and read the newest one.
  • Fetch https://api.github.com/repos/vercel/next.js/releases/latest with curl and pull the tag name out with jq.
  • Write a .env.example in /workspace/repo listing the variables the code reads.

The clone and curl prompts need run_command, so they only work once you switch it on. The Bash toolkit page lists every action.

Troubleshooting

The command was killed and returned nothing.

It ran past 20 seconds. Narrow it with head, a smaller path or a shallower clone.

cd or export "didn't work".

Each call is a new process. Put the whole sequence in one command joined with &&.

apt-get install fails, or a command isn't found.

Only the base tools are installed, and there's no root. Call sandbox_info to see what's there.

curl http://localhost:3000 fails.

localhost is the sandbox itself, and private and loopback addresses aren't reachable from it. The sandbox can't reach anything on your machine or your private network.

Files in /workspace disappeared.

The sandbox was recreated because the project's tool set changed. Re-clone or re-create them.

Missing CLI input ….

The command or file contains a literal {{word}}. See the quoting trap above.

Questions

Does this run anything on my computer?

No. Every action runs in your project's sandbox in Toolspoke's infrastructure.

Can an agent reach our internal database or staging server?

Only if it's reachable on the public internet. Private addresses aren't routable from the sandbox.

Can I install more tools?

Not with this toolkit, which adds nothing to the base image. Some other toolkits declare extra packages for the project's sandbox, the way Playwright adds a browser.

Connect Bash to Toolspoke

Install Bash in a project, give it to an agent, and every call is checked and logged.