8000 Rename ax ssh to ax exec, introduce ax cp · Issue #492 · google/ax · GitHub
[go: up one dir, main page]

Skip to content
< 8000 link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/0d-77dc442d6c309fe7.js" fetchpriority="low" />

Rename ax ssh to ax exec, introduce ax cp #492

Open

Description

@rakyll

ax ssh <task> [-- command...] doesn't open an SSH session. It starts a process in the task's container through the Agent Substrate guest process service and streams the process's stdout and stderr back, which is what kubectl exec does. The ssh name suggests keys, an sshd in the sandbox, or an interactive login, and none of those apply.

It isn't interactive either. The README describes ax ssh task123 as an interactive shell, but guest.ExecOptions has no stdin or TTY, so the /bin/sh that runs when no command is given can't read anything you type.

There's also no way to copy files into or out of a sandbox, which kubectl cp covers for pods.

Proposal

ax exec

Rename ax ssh to ax exec and follow kubectl exec conventions:

ax exec task123 -- ls -la /workspace
ax exec -a my-atespace task123 -- python3 main.py
ax exec task123 -- sh -c 'cd /workspace && git status'
  • -- is required between the task name and the command, as with kubectl exec. Today it's optional.
  • A command is required, as with kubectl exec. Today a missing command defaults to /bin/sh, which isn't useful without stdin.
  • The existing checks stay: the task must be Running and have spec.debug: true.

ax cp

Add ax cp, following kubectl cp: one argument is a local path, the other is <task>:<path>, and it copies from the first argument to the second.

ax cp task123:/workspace/report.json ./report.json  # from the sandbox
ax cp ./config.yaml task123:/workspace/config.yaml  # into the sandbox
ax cp my-atespace/task123:/workspace/out.log .       # atespace/task, like kubectl's namespace/pod

Activity

  1. added
    devxDeveloper experience: onboarding, defaults, and gaps found building on AX
    on Oct 15, 2026
  2. ktsoator commented on Oct 17, 2026

    @ktsoator
    Contributor

    Just wondering how stdin would work after the rename. Since #413 added stdin forwarding, would ax exec keep it enabled by default, or would it require -i like kubectl exec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    devxDeveloper experience: onboarding, defaults, and gaps found building on AX

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0