Sprites exec with file

Hi,

I’m trying to upload a file to use with a command, but it doesn’t seem to upload.

sprite exec --file test.css:home/sprite/test.css -- npx @tailwindcss/cli -i test.css -o test2.css

gives me

Uploaded test.css -> home/sprite/test.css (1400 bytes)
≈ tailwindcss v4.2.2

which seems promising! But then…

Specified input file `./test.css` does not exist.

Starting a console and poking around, I don’t see the file in the home directory. Any help would be appreciated. Thanks!

Should that be /home/sprite/test.css (initial forward slash)? I would guess your command has written to a file relative to your pwd, rather than referencing the filing system from the / root.

Thanks for the reply! I should have mentioned that I tried every iteration I could think of:

sprite exec --file test.css:/home/sprite/test.css -- npx @tailwindcss/cli -i test.css -o test2.css
Uploaded test.css -> /home/sprite/test.css (1400 bytes)
≈ tailwindcss v4.2.2

Specified input file `./test.css` does not exist.

which I verified was true, and then

sprite exec --file test.css:test.css -- npx @tailwindcss/cli -i test.css -o test2.css

and also


sprite exec --file test.css:./test.css -- npx @tailwindcss/cli -i test.css -o test2.css

which returned the same error

sprite exec -- ls -la
drwxr-x---  1 sprite sprite  4096 Apr 18 20:38 .
drwxr-xr-x  1 root   root    4096 Apr  5 14:02 ..
-rw-r--r--  1 sprite sprite   220 Sep  8  2025 .bash_logout
-rw-r--r--  1 sprite sprite  3771 Sep  8  2025 .bashrc
drwxr-xr-x  4 sprite sprite  4096 Apr  5 14:02 .cache
drwxr-xr-x  1 sprite sprite  4096 Apr  5 14:02 .claude
-rw-------  1 sprite sprite   325 Apr  5 14:02 .claude.json
drwxr-xr-x  3 sprite sprite  4096 Mar 28 01:43 .codex
drwxr-xr-x  4 sprite sprite  4096 Mar 28 01:43 .config
drwxr-xr-x  5 sprite sprite  4096 Mar 28 01:43 .cursor
drwxr-xr-x  4 sprite sprite  4096 Mar 28 01:43 .gemini
-rw-r--r--  1 sprite sprite    89 Mar 28 01:43 .gitconfig
-rw-r--r--  1 sprite sprite  2078 Aug 19  2024 .kshrc
drwxr-xr-x  6 sprite sprite  4096 Apr  5 14:02 .local
drwxr-xr-x  1 sprite sprite  4096 Apr  5 14:02 .npm
-rw-r--r--  1 sprite sprite   807 Sep  8  2025 .profile
-rw-r--r--  1 sprite sprite     0 Mar 28 01:44 .sudo_as_admin_successful
-rw-r--r--  1 sprite sprite   383 Mar 28 01:43 .tcshrc
-rw-r--r--  1 sprite sprite 49318 Apr 18 17:57 .zcompdump
-rw-------  1 sprite sprite   186 Apr 18 20:38 .zsh_history
-rw-r--r--  1 sprite sprite  1045 Mar 28 01:43 .zshrc
drwxr-xr-x 23 sprite sprite  4096 Apr 18 20:17 node_modules
-rw-r--r--  1 sprite sprite 34051 Apr 18 20:17 package-lock.json
-rw-r--r--  1 sprite sprite   143 Apr 18 20:17 package.json

The little guy is going somewhere, but IDK where.

Could you try sprite exec -- pwd, to see what default folder you have? Also consider running sprite exec -- ls -la /home/sprite, just to be sure.

Finally, make sure you’re sending to, and reading from, the same sprite.

No prob. I’m running the commands from the same prompt on macos, so I hope that they are the same sprite. I ran sprite use third to be sure.

.sprite file:

{
"organization": "[MY ORG IS HERE]",
"sprite": "third"
}

sprite exec -- pwd
/home/sprite
sprite exec -- ls -la /home/sprite
total 184
drwxr-x---  1 sprite sprite  4096 Apr 18 22:11 .
drwxr-xr-x  1 root   root    4096 Apr  5 14:02 ..
-rw-r--r--  1 sprite sprite   220 Sep  8  2025 .bash_logout
-rw-r--r--  1 sprite sprite  3771 Sep  8  2025 .bashrc
drwxr-xr-x  4 sprite sprite  4096 Apr  5 14:02 .cache
drwxr-xr-x  1 sprite sprite  4096 Apr  5 14:02 .claude
-rw-------  1 sprite sprite   325 Apr  5 14:02 .claude.json
drwxr-xr-x  3 sprite sprite  4096 Mar 28 01:43 .codex
drwxr-xr-x  4 sprite sprite  4096 Mar 28 01:43 .config
drwxr-xr-x  5 sprite sprite  4096 Mar 28 01:43 .cursor
drwxr-xr-x  4 sprite sprite  4096 Mar 28 01:43 .gemini
-rw-r--r--  1 sprite sprite    89 Mar 28 01:43 .gitconfig
-rw-r--r--  1 sprite sprite  2078 Aug 19  2024 .kshrc
drwxr-xr-x  6 sprite sprite  4096 Apr  5 14:02 .local
drwxr-xr-x  1 sprite sprite  4096 Apr  5 14:02 .npm
-rw-r--r--  1 sprite sprite   807 Sep  8  2025 .profile
-rw-r--r--  1 sprite sprite     0 Mar 28 01:44 .sudo_as_admin_successful
-rw-r--r--  1 sprite sprite   383 Mar 28 01:43 .tcshrc
-rw-r--r--  1 sprite sprite 49318 Apr 18 17:57 .zcompdump
-rw-------  1 sprite sprite   186 Apr 18 20:38 .zsh_history
-rw-r--r--  1 sprite sprite  1045 Mar 28 01:43 .zshrc
drwxr-xr-x 23 sprite sprite  4096 Apr 18 20:17 node_modules
-rw-r--r--  1 sprite sprite 34051 Apr 18 20:17 package-lock.json
-rw-r--r--  1 sprite sprite   143 Apr 18 20:17 package.json

Hmm, odd. Try adding --debug somewhere in that command; that might give some clues.

I assume the npx command is to be run remotely after the file copy. I would drop that for now, and make sure the file copy works first.

Even if I simplify the command to run

sprite exec --file test.css:test.css -- echo "hi"

I get no upload. I’ll keep playing around.

What did debug give you?

lightly edited

sprite exec --file test.css:test.css --debug  – npx @tailwindcss/cli -i test.css -o test2.css
time=2026-04-18T18:56:17.544-07:00 level=DEBUG msg=“Found sprite name from .sprite file” sprite=fourth
time=2026-04-18T18:56:17.544-07:00 level=DEBUG msg=“Final sprite selection” sprite=fourth
time=2026-04-18T18:56:17.544-07:00 level=DEBUG msg=“Failed to load sprite tracking” error=“failed to parse tracking file: unexpected end of JSON input”
time=2026-04-18T18:56:17.545-07:00 level=DEBUG msg=“Found sprite name from .sprite file” sprite=fourth
time=2026-04-18T18:56:17.545-07:00 level=DEBUG msg=“Final sprite selection” sprite=fourth
time=2026-04-18T18:56:17.545-07:00 level=DEBUG msg=“Failed to load sprite tracking” error=“failed to parse tracking file: unexpected end of JSON input”
time=2026-04-18T18:56:17.545-07:00 level=DEBUG msg=“Final organization selection” org=[REDACTED] url=https://api.sprites.dev
time=2026-04-18T18:56:17.545-07:00 level=DEBUG msg=“GetToken called” org=[REDACTED] url=https://api.sprites.dev hasManager=true keyringKey=sprites:org:https://api.sprites.dev:[REDACTED] userID=“” userEmail=“”
time=2026-04-18T18:56:17.570-07:00 level=DEBUG msg=“Found token in manual tokens keyring” org=[REDACTED] tokenLen=119 key=sprites:org:https://api.sprites.dev:[REDACTED] addedAt=2026-04-15T19:11:05.106-07:00
time=2026-04-18T18:56:17.588-07:00 level=DEBUG msg=“System keyring Get failed, attempting fallback” error=“secret not found in keyring”
time=2026-04-18T18:56:17.588-07:00 level=DEBUG msg=“Initialized file-based keyring fallback” dir=/Users/[REDACTED]/.sprites/keyring
time=2026-04-18T18:56:17.602-07:00 level=DEBUG msg=“System keyring Get failed, attempting fallback” error=“secret not found in keyring”
time=2026-04-18T18:56:17.602-07:00 level=DEBUG msg=“Failed to get token from legacy global keyring” triedKeys=“[sprites:org:https://api.sprites.dev:[REDACTED] sprites:org:[REDACTED]]”
time=2026-04-18T18:56:17.602-07:00 level=DEBUG msg=“Selected token based on timestamp” org=[REDACTED] source=global-manual addedAt=2026-04-15T19:11:05.106-07:00 totalCandidates=1
time=2026-04-18T18:56:17.602-07:00 level=DEBUG msg=GetActiveUser activeUserID=“” totalUsers=0
time=2026-04-18T18:56:17.602-07:00 level=DEBUG msg=“No active user ID set”
time=2026-04-18T18:56:17.602-07:00 level=WARN msg=“failed to upgrade token” org=[REDACTED] error=“no active user found”
time=2026-04-18T18:56:17.602-07:00 level=DEBUG msg=“Using org URL” original=https://api.sprites.dev base=https://api.sprites.dev
time=2026-04-18T18:56:17.602-07:00 level=DEBUG msg=“sprites: control disabled by client option” sprite=fourth
Uploaded test.css → test.css (1400 bytes)
time=2026-04-18T18:56:17.842-07:00 level=DEBUG msg=“Command started” connectionMode=direct sprite=fourth
time=2026-04-18T18:56:17.842-07:00 level=DEBUG msg=“Failed to load sprite tracking for recording” error=“failed to parse tracking file: unexpected end of JSON input”
time=2026-04-18T18:56:17.865-07:00 level=DEBUG msg=“sprites: non-pty received text message” type=debug data=“{"msg":"session_created cmd=npx","pid":4955,"t_ms":25,"type":"debug"}”
time=2026-04-18T18:56:17.865-07:00 level=DEBUG msg=“sprites: non-pty received text message” type=debug data=“{"msg":"normal_path history_len=0","pid":4955,"t_ms":25,"type":"debug"}”
time=2026-04-18T18:56:17.865-07:00 level=DEBUG msg=“sprites: non-pty received text message” type=session_info data=“{"type":"session_info","session_id":"4955","command":"npx","created":1776563777,"cols":0,"rows":0,"is_owner":false,"tty":false}”
≈ tailwindcss v4.2.2

Specified input file ./test.css does not exist.
time=2026-04-18T18:56:18.957-07:00 level=DEBUG msg=“sprites: non-pty received text message” type=debug data=“{"msg":"normal_exit exit_code=1 wait_err_type=*exec.ExitError wait_err=exit status 1","pid":4955,"t_ms":1111,"type":"debug"}”
time=2026-04-18T18:56:18.957-07:00 level=DEBUG msg=“sprites: non-pty received text message” type=exit data=“{"type":"exit","exit_code":1}”
time=2026-04-18T18:56:18.957-07:00 level=DEBUG msg=“sprites: non-pty exit” code=1
time=2026-04-18T18:56:18.957-07:00 level=DEBUG msg=“ExitError received” exitCode=1 cleanExit=true sessionID=“”

Super; bug found then?

Ah! I think I missed the error (and command failure) in your first message. I think this led me astray:

From what I can tell, from reading the thread again, is that the command failed (exit code 1) and gave a relevant error, and we went off looking for the file in the remote side anyway! :flushed_face:

Silly question: have you done an ls -la locally to see if the file is actually on your computer to start with?

Here’s a debug log from another command that might be clearer

sprite exec --file local.css:server.css --debug -- npx @tailwindcss/cli -i server.css -o serverout.css
time=2026-04-20T20:20:35.779-07:00 level=DEBUG msg="Extracting channel from version" currentVersion=v0.0.1-rc43 channel=rc
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Fetching release channel version"
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Fetching version from channel file" channel=release url=https://sprites-binaries.t3.storage.dev/client/release.txt
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Found sprite name from .sprite file" sprite=fourth
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Final sprite selection" sprite=fourth
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Failed to load sprite tracking" error="failed to parse tracking file: unexpected end of JSON input"
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Found sprite name from .sprite file" sprite=fourth
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Final sprite selection" sprite=fourth
time=2026-04-20T20:20:35.780-07:00 level=DEBUG msg="Failed to load sprite tracking" error="failed to parse tracking file: unexpected end of JSON input"
time=2026-04-20T20:20:35.781-07:00 level=DEBUG msg="Final organization selection" org=[REDACTED] url=https://api.sprites.dev
time=2026-04-20T20:20:35.781-07:00 level=DEBUG msg="GetToken called" org=[REDACTED] url=https://api.sprites.dev hasManager=true keyringKey=sprites:org:https://api.sprites.dev:[REDACTED] userID="" userEmail=""
time=2026-04-20T20:20:35.802-07:00 level=DEBUG msg="Found token in manual tokens keyring" org=[REDACTED] tokenLen=119 key=sprites:org:https://api.sprites.dev:[REDACTED] addedAt=2026-04-15T19:11:05.106-07:00
time=2026-04-20T20:20:35.817-07:00 level=DEBUG msg="System keyring Get failed, attempting fallback" error="secret not found in keyring"
time=2026-04-20T20:20:35.817-07:00 level=DEBUG msg="Initialized file-based keyring fallback" dir=/Users/scottmcclure/.sprites/keyring
time=2026-04-20T20:20:35.830-07:00 level=DEBUG msg="System keyring Get failed, attempting fallback" error="secret not found in keyring"
time=2026-04-20T20:20:35.830-07:00 level=DEBUG msg="Failed to get token from legacy global keyring" triedKeys="[sprites:org:https://api.sprites.dev:[REDACTED] sprites:org:[REDACTED]]"
time=2026-04-20T20:20:35.830-07:00 level=DEBUG msg="Selected token based on timestamp" org=[REDACTED] source=global-manual addedAt=2026-04-15T19:11:05.106-07:00 totalCandidates=1
time=2026-04-20T20:20:35.830-07:00 level=DEBUG msg=GetActiveUser activeUserID="" totalUsers=0
time=2026-04-20T20:20:35.830-07:00 level=DEBUG msg="No active user ID set"
time=2026-04-20T20:20:35.830-07:00 level=WARN msg="failed to upgrade token" org=[REDACTED] error="no active user found"
time=2026-04-20T20:20:35.831-07:00 level=DEBUG msg="Using org URL" original=https://api.sprites.dev base=https://api.sprites.dev
time=2026-04-20T20:20:35.831-07:00 level=DEBUG msg="sprites: control disabled by client option" sprite=fourth
time=2026-04-20T20:20:36.157-07:00 level=DEBUG msg="Channel file response" status=404
time=2026-04-20T20:20:36.157-07:00 level=DEBUG msg="Channel file not found"
time=2026-04-20T20:20:36.157-07:00 level=DEBUG msg="Fetching rc channel version"
time=2026-04-20T20:20:36.157-07:00 level=DEBUG msg="Fetching version from channel file" channel=rc url=https://sprites-binaries.t3.storage.dev/client/rc.txt
time=2026-04-20T20:20:36.229-07:00 level=DEBUG msg="Channel file response" status=200
time=2026-04-20T20:20:36.230-07:00 level=DEBUG msg="Channel version retrieved" channel=rc version=v0.0.1-rc43
time=2026-04-20T20:20:36.230-07:00 level=DEBUG msg="Found rc version" version=v0.0.1-rc43
Uploaded local.css -> server.css (1400 bytes)
time=2026-04-20T20:20:39.485-07:00 level=DEBUG msg="Command started" connectionMode=direct sprite=fourth
time=2026-04-20T20:20:39.485-07:00 level=DEBUG msg="Failed to load sprite tracking for recording" error="failed to parse tracking file: unexpected end of JSON input"
time=2026-04-20T20:20:39.515-07:00 level=DEBUG msg="sprites: non-pty received text message" type=debug data="{\"msg\":\"session_created cmd=npx\",\"pid\":8418,\"t_ms\":27,\"type\":\"debug\"}"
time=2026-04-20T20:20:39.515-07:00 level=DEBUG msg="sprites: non-pty received text message" type=debug data="{\"msg\":\"normal_path history_len=0\",\"pid\":8418,\"t_ms\":27,\"type\":\"debug\"}"
time=2026-04-20T20:20:39.515-07:00 level=DEBUG msg="sprites: non-pty received text message" type=session_info data="{\"type\":\"session_info\",\"session_id\":\"8418\",\"command\":\"npx\",\"created\":1776741639,\"cols\":0,\"rows\":0,\"is_owner\":false,\"tty\":false}"
≈ tailwindcss v4.2.2

Specified input file `./server.css` does not exist.
time=2026-04-20T20:20:41.078-07:00 level=DEBUG msg="sprites: non-pty received text message" type=debug data="{\"msg\":\"normal_exit exit_code=1 wait_err_type=*exec.ExitError wait_err=exit status 1\",\"pid\":8418,\"t_ms\":1589,\"type\":\"debug\"}"
time=2026-04-20T20:20:41.078-07:00 level=DEBUG msg="sprites: non-pty received text message" type=exit data="{\"type\":\"exit\",\"exit_code\":1}"
time=2026-04-20T20:20:41.078-07:00 level=DEBUG msg="sprites: non-pty exit" code=1
time=2026-04-20T20:20:41.078-07:00 level=DEBUG msg="ExitError received" exitCode=1 cleanExit=true sessionID=""

As far as I can tell, the error is server side. I do have the file here locally and the command still shows that it’s uploading the file … somewhere. I’ve given up on this for now. I’m changing tactics and using the API to upload the file, which works. Thanks for the help.