Alpha preview. Not for production use.
Working anonymously. to save your work permanently.
Reference

Exporting Projects

Export your complete project as a portable ZIP file containing source code, build artifacts, documentation, and tests.

Overview

The Export feature packages your entire project into a downloadable ZIP file. This is useful for:

  • Sharing projects with team members
  • Creating backups of your work
  • Moving projects to local development environments
  • Archiving completed contracts
  • Distributing contracts with documentation

How to Export

  1. Open your project in the editor
  2. Click the Menu button (three dots) in the project header
  3. Select Export Project
  4. The ZIP file downloads automatically
Tip
Build your project before exporting to include the latest artifacts and generated documentation.

ZIP File Structure

The exported ZIP file contains a well-organized folder structure:

Text
1MyProject.zip
2├── project.json           # Project metadata
3├── src/                   # Source files
4│   └── contract.algo.ts
5├── build/                 # Build artifacts (per contract)
6│   └── Counter/
7│       ├── Counter.approval.teal
8│       ├── Counter.clear.teal
9│       ├── Counter.arc56.json
10│       └── CounterClient.ts
11├── docs/                  # Generated documentation
12│   ├── Counter_docs.md
13│   └── Counter_docs.html
14└── tests/                 # Ghost test configurations
15    └── ghost-tests.json

project.json

The root project.json file contains metadata about your project:

project.json JSON
1{
2  "name": "MyProject",
3  "id": "proj_abc123",
4  "language": "typescript",
5  "exportedAt": "2025-01-14T12:00:00.000Z",
6  "avmStudioVersion": "0.1.0",
7  "ghostTestCount": 3
8}
  • name - Project display name
  • id - Unique project identifier
  • language - Programming language (typescript, python, or teal)
  • exportedAt - Export timestamp
  • avmStudioVersion - Version of AVM Studio used
  • ghostTestCount - Number of included ghost tests

Source Files (src/)

The src/ folder contains all your source files exactly as they appear in the editor:

  • Contract source code (.algo.ts, .py, or .teal)
  • Any additional files in your project
  • File structure is preserved

Build Artifacts (build/)

The build/ folder contains compiled artifacts, organized by contract name:

{Contract}.approval.teal
Compiled approval program
{Contract}.clear.teal
Compiled clear state program
{Contract}.arc56.json
ARC-56 application specification
{Contract}Client.ts
Generated TypeScript client

If your project has multiple contracts, each gets its own subfolder under build/.

Documentation (docs/)

The docs/ folder contains auto-generated documentation for each contract in two formats:

Markdown ({Contract}_docs.md)

A plain-text Markdown file containing:

  • Contract name and description
  • Quick stats (method count, state schema, etc.)
  • Compiler information
  • State schema (global, local, box)
  • All state keys with types and descriptions
  • Struct definitions
  • Method documentation with signatures, arguments, and return types
  • Event definitions
  • Template and scratch variables
  • Bare action handlers

HTML ({Contract}_docs.html)

A standalone HTML file that can be opened in any browser. Features:

  • Clean, professional styling
  • Light and dark mode support (follows system preference)
  • All embedded CSS (no external dependencies)
  • Collapsible sections for easy navigation
  • Syntax highlighting for types
Tip
The HTML documentation is perfect for sharing with stakeholders who want to review your contract's interface without needing technical tools.

Ghost Tests (tests/)

If you've created ghost tests, they're exported in tests/ghost-tests.json:

ghost-tests.json JSON
1{
2  "version": 1,
3  "exportedAt": "2025-01-14T12:00:00.000Z",
4  "tests": [
5    {
6      "name": "Basic increment test",
7      "description": "Tests the counter increment flow",
8      "mode": "simple",
9      "configuration": {
10        "calls": [...],
11        "initialState": {...}
12      },
13      "createdAt": "2025-01-10T08:00:00.000Z",
14      "updatedAt": "2025-01-12T10:30:00.000Z"
15    }
16  ]
17}

Ghost tests are portable - they use contract names instead of internal IDs, so they can be re-imported into any project with matching contracts.

Multi-Contract Projects

If your project contains multiple contracts, the export handles them automatically:

Text
1build/
2├── TokenVault/
3│   ├── TokenVault.approval.teal
4│   ├── TokenVault.arc56.json
5│   └── TokenVaultClient.ts
6└── TokenVaultFactory/
7    ├── TokenVaultFactory.approval.teal
8    ├── TokenVaultFactory.arc56.json
9    └── TokenVaultFactoryClient.ts
10
11docs/
12├── TokenVault_docs.md
13├── TokenVault_docs.html
14├── TokenVaultFactory_docs.md
15└── TokenVaultFactory_docs.html

Using Exported Files

In AlgoKit Projects

Copy the generated client files to your AlgoKit project:

Bash
1# Copy client to your project
2cp build/Counter/CounterClient.ts ./src/contracts/
3
4# Copy ARC-56 spec if needed
5cp build/Counter/Counter.arc56.json ./src/contracts/

For Deployment

Use the TEAL files for direct deployment with algosdk or other tools:

TypeScript
1import { readFileSync } from 'fs';
2
3const approvalProgram = readFileSync('build/Counter/Counter.approval.teal', 'utf-8');
4const clearProgram = readFileSync('build/Counter/Counter.clear.teal', 'utf-8');
5
6// Deploy using algosdk...

Sharing Documentation

The HTML docs can be hosted on any web server or opened directly in a browser:

Bash
1# Open in default browser
2open docs/Counter_docs.html
3
4# Or serve locally
5npx serve docs/