Quick Start Guide
A simplified guide for non-technical users to get started quickly.
What You'll Need
- A computer with internet access
- Node.js installed - Download here
- A code editor - We strongly recommend Visual Studio Code (it's free!)
Best Editor for Ink
Visual Studio Code (VS Code) is the best choice because:
- It's free and easy to use
- Has an Ink extension that helps you write stories
- Shows errors as you type
- Works on Windows, Mac, and Linux
To set up VS Code:
- Download and install VS Code
- Open VS Code
- Click the Extensions icon on the left (looks like building blocks)
- Search for "Ink" and install the extension by "inkle"
- Now you can open your
.inkfiles with syntax highlighting!
Step-by-Step Setup
1. Create Your Project from the Template
Using GitHub (Recommended):
- Go to: https://github.com/andy3471/encounters-story-example
- Click the green "Use this template" button (near the top right)
- Click "Create a new repository"
- Fill in the details:
- Repository name: Give it a name (e.g.,
my-story) - Description: Optional description of your story
- Public or Private: Choose your preference
- Repository name: Give it a name (e.g.,
- Click "Create repository"
- On your new repository page, click the green "Code" button
- Copy the URL shown
- Open Terminal/Command Prompt (see next step)
- Type:
git cloneand paste the URL, then press Enter - Type:
cd your-repository-name(use the name you chose) and press Enter
2. Open Terminal/Command Prompt
On Windows:
- Press
Windows Key + R - Type
cmdand press Enter
On Mac:
- Press
Command + Space - Type
terminaland press Enter
3. Navigate to Your Project
If you haven't already (from step 1), navigate to your project folder.
In the terminal, type:
cd path/to/your/project(Replace path/to/your/project with where you saved the files)
Example:
- Windows:
cd C:\Users\YourName\Documents\my-story - Mac/Linux:
cd ~/Documents/my-story
4. Configure npm for GitHub Packages
Before installing dependencies, you need to set up authentication for GitHub Packages.
- In your project folder, create a new file called
.npmrc(you can do this in VS Code or any text editor) - Open
.npmrcand add these two lines:@andy3471:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken=YOUR AUTH TOKEN - Replace
YOUR AUTH TOKENwith your GitHub Personal Access Token- Go to https://github.com/settings/tokens
- Click "Generate new token" → "Generate new token (classic)"
- Give it a name like "npm packages"
- Check the
read:packagespermission - Click "Generate token"
- Copy the token (you won't see it again!)
- Paste it in place of
YOUR AUTH TOKENin your.npmrcfile
- Save the
.npmrcfile
Important
Never share your .npmrc file or commit it to Git! Keep your token secret.
5. Install Dependencies
Type this and press Enter:
npm installWait for it to finish (this might take a minute).
6. Make Your First Build
Type this and press Enter:
npm run build:storyIf you see "✅ Build complete", you're ready to go!
7. Test Your Story in the Browser (Optional)
Want to see your story in action before publishing? You can run it locally:
In the terminal, type:
bashnpm run run:storyYour browser should automatically open to
https://localhost:3000You can now test your story interactively!
To see changes after editing:
- Save your changes to the story files
- Restart the story in the browser (the changes are deployed automatically, but you need to restart the story to see them)
When you're done testing, press
Ctrl+Cin the terminal to stop the server
Testing Tip
This is perfect for testing your story before publishing! Make changes, save, restart the story, and see how it works.
Publishing Your Story
Before You Publish
You need two things:
- Story ID - Get this from the website
- API Key - Get this from the tokens page
Get Your Story ID
- Open your web browser
- Go to: https://encounters.andyh.app/authors/test/stories
- Click "Create New Story" (or similar button)
- Fill in your story details
- After creating, look at the URL in your browser
- Copy the long string of letters and numbers at the end
- Example:
https://encounters.andyh.app/authors/test/stories/abc-123-def-456 - Copy:
abc-123-def-456
- Example:
- Save this somewhere - this is your STORY_ID
Get Your API Key
- Go to: https://encounters.andyh.app/authors/test/manage-passport-tokens
- Click "Create New Token" (or similar)
- Give it a name like "My Publishing Key"
- Copy the API key immediately - you won't see it again!
- Save this somewhere safe - this is your API_KEY
Set Up Your .env File
- In your project folder, find the file called
.env.example - Make a copy of it and rename the copy to
.env(just.env, no.example) - Open
.envin a text editor - You'll see something like this:
BASE_URL= STORY_ID= API_KEY= - Fill it in like this:(Use your actual Story ID and API Key)
BASE_URL=https://encounters.andyh.app STORY_ID=abc-123-def-456 API_KEY=your-api-key-here - Save the file
Publish!
In the terminal, type:
npm run publish:storyIf you see "✅ Upload complete", your story is published! 🎉
Making Changes to Your Story
Editing Story Content
- Open the files in
src/ink/folder - Edit the
.inkfiles with your narrative- Use
#typing:3sto show typing indicators (can usesfor seconds,mfor minutes,hfor hours) - Use
#delay:5sto add pauses (can uses,m, orh) - See the Tag Reference for all available tags
- Use
- Save your changes
- Build again:
npm run build:story - If there are no errors, publish:
npm run publish:story
Common Files to Edit
src/ink/- Your story scripts (open these in VS Code!)src/contacts/- Character information (JSON files)src/conversations/- Conversation settings (JSON files)src/assets/- Images and avatars
Using VS Code
You can open your entire project in VS Code:
- Open VS Code
- Click File → Open Folder
- Select your project folder
- Now you can edit all files easily!
Troubleshooting
"npm: command not found"
You need to install Node.js. Download it from nodejs.org.
"Failed to compile"
There's a syntax error in your Ink script. The error message will tell you which file and line number. Check that file for typos.
"Missing environment variable"
Your .env file is missing or incomplete. Make sure you created it and filled in all three values (BASE_URL, STORY_ID, API_KEY).
"401 Unauthorized"
Your API key is wrong or expired. Go back to the tokens page and create a new one.
"Build artifact not found"
The build failed. Run npm run build:story first and fix any errors before publishing.
Tips for Beginners
Start Small
Don't try to write your whole story at once. Start with one simple conversation and build from there.
Test Often
Build your story frequently to catch errors early. It's easier to fix one small mistake than many big ones.
Save Your Credentials
Keep your Story ID and API Key in a safe place. You'll need them every time you publish.
Use Watch Mode
While editing, run npm run build:story -- --watch in the terminal. It will automatically rebuild when you save files.
Next Steps
Once you're comfortable with the basics:
- Check the Tag Reference Card for all available Ink tags
- Read the Ink Scripting Guide to learn all the features
- Check out the Project Structure to understand the files
- Learn about Building and Publishing in detail
- Set up GitHub Actions for automatic deployment
Getting Help
If you get stuck:
- Check the error message - it usually tells you what's wrong
- Read the relevant documentation page
- Look at the example files to see how things work
- Make sure you followed all the steps exactly
Remember: Everyone starts as a beginner. Take it one step at a time! 🚀