Skip to main content
Version: 0.2.0

Distributing Modules

Share your modules with teammates, across organizations, or with the world.

Creating Archives

Create a zip archive for distribution:

# Default output: <module-name>.invowkmod.zip
invowk module archive ./mytools.invowkmod

# Custom output path
invowk module archive ./mytools.invowkmod --output ./dist/mytools.zip

Output:

Archive Module

✓ Module archived successfully

• Output: /home/user/dist/mytools.zip
• Size: 2.45 KB

Importing Modules

From Local File

# Install to ~/.invowk/cmds/
invowk module import ./mytools.invowkmod.zip

# Install to custom directory
invowk module import ./mytools.invowkmod.zip --path ./local-modules

# Overwrite existing
invowk module import ./mytools.invowkmod.zip --overwrite

From URL

# Download and install
invowk module import https://example.com/modules/mytools.zip

# From GitHub release
invowk module import https://github.com/user/repo/releases/download/v1.0/mytools.invowkmod.zip

Output:

Import Module

✓ Module imported successfully

• Name: mytools
• Path: /home/user/.invowk/cmds/mytools.invowkmod

• The module commands are now available via invowk

Listing Installed Modules

invowk module list

Output:

Discovered Modules

• Found 3 module(s)

• current directory:
✓ local.project
/home/user/project/local.project.invowkmod

• user modules (~/.invowk/cmds):
✓ com.company.devtools
/home/user/.invowk/cmds/com.company.devtools.invowkmod
✓ io.github.user.utilities
/home/user/.invowk/cmds/io.github.user.utilities.invowkmod

Distribution Methods

Direct Sharing

  1. Create archive: invowk module archive
  2. Share the zip file (email, Slack, etc.)
  3. Recipient imports: invowk module import

Git Repository

Include modules in your repo:

my-project/
├── src/
├── modules/
│ ├── devtools.invowkmod/
│ │ ├── invowkmod.cue
│ │ └── invowkfile.cue
│ └── testing.invowkmod/
│ ├── invowkmod.cue
│ └── invowkfile.cue
└── invowkfile.cue

Team members get modules when they clone the repo.

GitHub Releases

  1. Create archive
  2. Attach to GitHub release
  3. Share the download URL
# Recipients install with:
invowk module import https://github.com/org/repo/releases/download/v1.0.0/mytools.invowkmod.zip

Package Registry (Future)

Future versions may support:

invowk module install com.company.devtools@1.0.0

Install Locations

User Commands (Default)

invowk module import mytools.zip
# Installed to: ~/.invowk/cmds/mytools.invowkmod/

Available globally for the user.

Project-Local

invowk module import mytools.zip --path ./modules
# Installed to: ./modules/mytools.invowkmod/

Only available in this project.

Custom Include Path

Configure additional includes:

// ~/.config/invowk/config.cue
includes: [
{path: "/shared/company-modules/tools.invowkmod"},
]

Install there:

invowk module import mytools.zip --path /shared/company-modules

Version Management

Semantic Versioning

Declare a module version in invowkmod.cue:

module: "com.company.tools"
version: "1.2.0"

Archive Naming

Include version in archive name:

invowk module archive ./mytools.invowkmod --output ./dist/mytools-1.2.0.zip

Upgrade Process

# Remove old version
rm -rf ~/.invowk/cmds/mytools.invowkmod

# Install new version
invowk module import mytools-1.2.0.zip

# Or use --overwrite
invowk module import mytools-1.2.0.zip --overwrite

Team Distribution

Shared Network Location

# Admin publishes
invowk module archive ./devtools.invowkmod --output /shared/modules/devtools.zip

# Team members import
invowk module import /shared/modules/devtools.zip

Internal Package Server

Host modules on internal HTTP server:

# Team members import via URL
invowk module import https://internal.company.com/modules/devtools.zip

Best Practices

  1. Validate before archiving: invowk module validate --deep
  2. Use semantic versioning: Track changes clearly
  3. Include README: Document module usage
  4. RDNS naming: Prevent conflicts
  5. Changelog: Document what changed between versions

Example Workflow

# 1. Create and develop module
invowk module create com.company.mytools --scripts
# ... add commands and scripts ...

# 2. Validate
invowk module validate ./com.company.mytools.invowkmod --deep

# 3. Create versioned archive
invowk module archive ./com.company.mytools.invowkmod
--output ./releases/mytools-1.0.0.zip

# 4. Distribute (e.g., upload to GitHub release)

# 5. Team imports
invowk module import https://github.com/company/mytools/releases/download/v1.0.0/mytools-1.0.0.zip

Next Steps