DFX sync/upload assets to Motoko asset canister

Is there a way to sync/upload assets to an asset canister via DFX with a command/config
I know there is the ‘asset’ canister type that will create and sync in the background but I am looking for a solution to have a Motoko canister, with the Asset Canister Interface, be deployed and sync’d

It seems like there is the crate crates.io: Rust Package Registry that can be used with the CLI, but was trying to avoid having more complexity and dependencies on rust/cargo

2 Likes

We have an old ticket laying around (note to self: this one) that would make this possible, but it would need a bit of design work.

For now the icx-asset tool you found is the only option on CLI. For Rust code we also have the ic-asset crate (icx-asset is just a CLI wrapper around it), and for JS there is the @dfinity/assets package that I don’t know how up-to-date it is, but I know it works with the latest asset canisters.

2 Likes

I would love something in DFX
But ill work with these for now. thank you

The @dfinity/assets npm package is regularly kept up to date along with the rest of the agent-js suite

3 Likes