Skip to content

Getting Started

secco is a command-line tool for local development. It uses Verdaccio and direct file copying to apply your latest changes to other projects.

When developing and maintaining (multiple) packages, it’s a real hassle to use something like npm link. But you also don’t want to publish your changes to npm’s remote registry. Both have a lot of pitfalls as they might break on complicated dependency chains or symlinking.

secco solves these problems and streamlines the process of local package testing.

Install secco

Using a global installation:

Terminal window
npm install --global secco

You can also use npx to invoke it.

Terminal window
npx secco@latest --help

Initialize a .seccorc file

In order to link the destination to your source (terminology explainer), secco utitlizes its own .seccorc configuration file. This way you only need to provide that information once, on all consecutive runs secco automatically looks in the right spot.

  1. Navigate to your destination and run the following command in your terminal:

    Terminal window
    secco init
  2. When the prompt asks, “What is the absolute path to your source?”, enter the absolute path to your source.

    Terminal window
    ? What is the absolute path to your source?
    · /Users/username/repositories/ai-magic
  3. The prompt will show you a summary of what secco init will do. When the prompt asks, “Do you want to create the file?”, enter “Y”.

You should have a new .seccorc file inside your destination.

Start secco

Before starting secco, you should ensure that your source’s entrypoints are available. This could mean that you have to compile your source files (ideally in watch mode). Otherwise secco won’t find anything to copy over.

Inside your destination, start secco like so:

Terminal window

secco will now scan your destination’s package.json file and compare its dependencies/devDependencies with packages that it can find inside the source.

If necessary, secco publishes your source to a local Verdaccio registry. This won’t happen every time (especially on consecutive runs) as secco then just uses file copying directly. When Verdaccio is used, the terminal prints this:

Terminal window
[Verdaccio] Starting server...
[Verdaccio] Started successfully!
Publishing ai-magic@1.0.0-secco-1697394661753 to local registry...
Published ai-magic@1.0.0-secco-1697394661753 to local registry
Installing packages from local registry:
- ai-magic
Installation finished successfully!

In any case, when secco copies over the files from the source to destination you’ll discover a similar terminal output:

Terminal window
Copied index.mjs to node_modules/ai-magic/index.mjs
Copied package.json to node_modules/ai-magic/package.json

Now go back to your source, edit a file, and let the file be re-compiled. secco should copy over the new file into your destination again.

What’s next?

Browse the CLI reference: commands, config options, and flags. You can also check out the advanced guides like Continuous Integration.