Installing Sentra
Sentra can be installed in several ways depending on your operating system and preferences.
Quick Installation
Option 1: Binary Releases (Recommended)
Download the latest pre-compiled binary for your platform:
- Visit the releases page
- Download the appropriate binary for your system:
- Windows:
sentra-windows-amd64.exe - macOS:
sentra-macos-amd64(Intel) orsentra-macos-arm64(Apple Silicon) - Linux:
sentra-linux-amd64orsentra-linux-arm64
- Windows:
- Make it executable and add to PATH
Option 2: Build from Source
Prerequisites:
- Go 1.21 or later
- Git
# Clone the repository
git clone https://github.com/sentra-language/sentra.git
cd sentra
# Build Sentra
make sentra
# or
go build -o sentra ./cmd/sentra
# Add to PATH (optional)
sudo mv sentra /usr/local/bin/
Platform-Specific Instructions
Windows
- Download: Get
sentra-windows-amd64.exefrom releases - Rename: Rename to
sentra.exe - Move: Place in a folder like
C:\tools\sentra\ - Add to PATH:
- Open System Properties → Environment Variables
- Add
C:\tools\sentrato your PATH
Or using PowerShell:
# Download and install
Invoke-WebRequest -Uri "https://github.com/sentra-language/sentra/releases/latest/download/sentra-windows-amd64.exe" -OutFile "sentra.exe"
Move-Item sentra.exe C:\tools\sentra\
# Add to PATH manually through System Properties
macOS
# Using Homebrew (when available)
brew install sentra-language/tap/sentra
# Or download binary
curl -L https://github.com/sentra-language/sentra/releases/latest/download/sentra-macos-amd64 -o sentra
chmod +x sentra
sudo mv sentra /usr/local/bin/
# For Apple Silicon Macs
curl -L https://github.com/sentra-language/sentra/releases/latest/download/sentra-macos-arm64 -o sentra
chmod +x sentra
sudo mv sentra /usr/local/bin/
Linux
Ubuntu/Debian
# Download and install
wget https://github.com/sentra-language/sentra/releases/latest/download/sentra-linux-amd64 -O sentra
chmod +x sentra
sudo mv sentra /usr/local/bin/
# Or add to ~/.local/bin for user installation
mkdir -p ~/.local/bin
mv sentra ~/.local/bin/
# Add ~/.local/bin to PATH in ~/.bashrc or ~/.zshrc
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
CentOS/RHEL/Fedora
# Download
curl -L https://github.com/sentra-language/sentra/releases/latest/download/sentra-linux-amd64 -o sentra
chmod +x sentra
sudo mv sentra /usr/local/bin/
Arch Linux
# Install from AUR (when available)
yay -S sentra
# Or manual installation
wget https://github.com/sentra-language/sentra/releases/latest/download/sentra-linux-amd64 -O sentra
chmod +x sentra
sudo mv sentra /usr/local/bin/
Verify Installation
After installation, verify Sentra is working:
# Check version
sentra --version
# Run a simple test
echo 'log("Hello, Sentra!")' | sentra run -
# Check available commands
sentra --help
Expected output:
Sentra Programming Language v1.0.0
Built with Go 1.21
IDE and Editor Support
Visual Studio Code
Install the Sentra Language Extension:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for “Sentra Language Support”
- Install the extension
Vim/Neovim
# Install vim plugin
git clone https://github.com/sentra-language/vim-sentra ~/.vim/bundle/vim-sentra
Emacs
;; Add to your .emacs or init.el
(use-package sentra-mode
:ensure t
:mode "\\.sn\\'")
Development Environment Setup
Create First Project
# Initialize a new Sentra project
sentra init my-first-project
cd my-first-project
# Project structure
ls -la
# .
# ├── main.sn # Entry point
# ├── sentra.toml # Project configuration
# ├── src/ # Source files
# └── tests/ # Test files
Configure Your Environment
Create a sentra.toml in your project:
[package]
name = "my-app"
version = "1.0.0"
description = "My Sentra application"
author = "Your Name <email@example.com>"
[dependencies]
# Add dependencies here when available
[build]
target = "."
output = "dist/"
[test]
directory = "tests/"
pattern = "*.test.sn"
Troubleshooting
Common Issues
1. Command not found
# Check if Sentra is in PATH
which sentra
echo $PATH
# If not found, add to PATH
export PATH="$PATH:/path/to/sentra"
2. Permission denied (Linux/macOS)
# Make executable
chmod +x sentra
# Check permissions
ls -la sentra
3. “Cannot execute binary file” (Linux) This means you downloaded the wrong architecture. Download the correct one:
- For 64-bit Intel/AMD:
sentra-linux-amd64 - For ARM64:
sentra-linux-arm64
4. Windows antivirus blocking Some antivirus software may flag the binary. Add an exception for the Sentra executable.
Getting Help
If you encounter issues:
- Check the FAQ
- Search GitHub Issues
- Ask on GitHub Discussions
- Join our Discord Community
Next Steps
Now that Sentra is installed:
Updating Sentra
To update to the latest version:
# Check current version
sentra --version
# Download and replace with new version
# (repeat installation steps with latest release)
# Or if using package manager
brew upgrade sentra # macOS with Homebrew
yay -Syu sentra # Arch Linux with AUR
Uninstalling
To remove Sentra:
# Remove binary
sudo rm /usr/local/bin/sentra
# Remove VS Code extension
code --uninstall-extension sentra-language.sentra
# Remove project files (optional)
rm -rf ~/.sentra
Next, let’s write your first Sentra program and learn the basic syntax.