DEV Community

ABHISHEK PANDEY
ABHISHEK PANDEY

Posted on

SoulKing-AI

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

💀🎸 SoulKing AI — Your Terminal. Your AI. Your Phantom.

What if your Linux terminal had a soul of its own?

Imagine opening your terminal late at night and finding a mysterious digital spirit waiting for you. It can explain Linux commands, analyze potentially dangerous operations, tell creepy stories, and help you explore your system.

Meet SoulKing AI, a haunted, terminal-based Linux assistant that combines local AI, practical Linux utilities, defensive security tools, and a spooky personality.

Built with Python, Rich, SQLite, and the Ollama API, SoulKing transforms the familiar Linux command line into an interactive experience inspired by the Ghost in the Machine theme.

But this ghost isn't completely dependent on the internet. Even when the local AI service is unavailable, SoulKing's built-in utilities and offline story generator can keep working.

Let's explore the machine! 👻

👻 What I Built

SoulKing AI is a terminal-based assistant designed for Kali Linux and other Linux distributions.

I wanted to create something that combines two ideas:

  • A spooky digital companion with a personality.
  • A practical Linux assistant that helps users understand their system and commands.

SoulKing includes three selectable personality modes:

  • 💀 SoulKing Mode: A friendly, humorous, theatrical skeleton-musician spirit.
  • 👻 Ghost Mode: A mysterious personality with spooky responses.
  • 💻 Developer Mode: A technical assistant for Python, Java, Linux, Git, and debugging.

Beyond its personality, SoulKing includes system diagnostics, Linux command assistance, network utilities, command-risk analysis, local SQLite storage, and a ghost story generator.

The project is entirely terminal-based. There is no graphical application window or browser interface.

🖥️ Demo: Inside the Haunted Machine

Here are four screenshots of SoulKing AI running in the terminal.

💀 1. The Haunted Terminal Awakens

SoulKing AI haunted terminal startup

The first screen introduces SoulKing's identity through its ASCII banner, terminal prompt, system information, and startup greeting.

It also displays the current AI connection status and confirms that local SQLite memory has been initialized.

In this captured session, Ollama is offline. SoulKing clearly reports the unavailable service instead of pretending that the AI model is running.

That's an important part of the design: the application communicates its actual status to the user.

📜 2. A Command Reference for the Phantom

SoulKing AI categorized command reference

SoulKing includes a categorized command reference that helps users discover its capabilities.

The available commands cover several areas:

  • General application controls and configuration.
  • System information and diagnostics.
  • Linux command assistance.
  • Local AI model selection and conversations.
  • Network utilities.
  • Defensive security tools.
  • Ghost story generation.

Rather than requiring users to memorize everything, the help command provides a structured overview of the terminal assistant.

🛡️ 3. Command Risk Analyzer and Linux Assistance

SoulKing AI command risk analyzer

This is one of SoulKing's most practical features.

The screenshot demonstrates the command:

risk rm -rf /tmp/example && suggest show listening network ports

SoulKing identifies the recursive deletion operation as high risk and explains why it can permanently remove files. It also suggests a safer alternative.

The command suggestion feature then proposes ss -tuln for displaying listening network ports.

Notice the important detail: the proposed command is never automatically executed.

The screenshot also demonstrates that SoulKing can provide built-in Linux assistance when the Ollama service is disconnected.

Static command analysis is a useful precaution, although it cannot guarantee that every command is safe. Users should always inspect commands and their arguments before running them.

👻 4. Ghost Stories from the Machine

SoulKing AI ghost story generator and system diagnostics

Every haunted terminal needs a storyteller.

This screenshot demonstrates the command:

story short && sysinfo

SoulKing generates a short fictional horror story titled "The Violin in /dev/null".

The story imagines a strange event on a Linux server, where a corrupted core dump and a mysterious melody turn an ordinary system log into a miniature piece of digital horror.

The screenshot identifies the story source as the built-in offline archive because Ollama is disconnected.

After the story, SoulKing displays Linux system information, including the distribution, kernel, architecture, Python version, and working directory.

This is exactly the kind of experience I wanted: a terminal that remains useful while giving users something unexpected.

💻 Code

GitHub Repository: SoulKing-AI

The project is written in Python and released under the MIT License.

The repository contains the source code, terminal screenshots, tests, installation instructions, and configuration documentation.

I built SoulKing to be explored, customized, and extended by other developers.

⚙️ How I Built It

SoulKing uses a terminal-first architecture, keeping the command line as its entire interface.

Technology Stack

  • Python 3.11+: Core application logic and Linux utilities.
  • Rich: Terminal formatting, tables, and an enhanced command-line experience.
  • Ollama: Local model serving through its HTTP API.
  • Llama 3.2: An example open-weight model supported by the project.
  • SQLite: Local storage for conversations, command history, favorites, saved stories, and preferences.
  • TOML: Human-readable application configuration.

The application can also be configured to use another compatible installed model, such as Qwen2.5-Coder.

🧠 Local AI Integration

SoulKing connects to an Ollama service running locally on the machine.

When Ollama is available and a compatible model is installed, users can interact with the assistant through commands such as ask and can generate AI-powered stories.

The application checks the service's availability and reports when it cannot connect.

The screenshots show the offline state, where the built-in story archive and supported Linux assistance features continue to work.

🐧 Linux Utilities

SoulKing includes commands for:

  • Viewing CPU, memory, disk, and uptime information.
  • Listing running processes.
  • Explaining Linux commands and their flags.
  • Suggesting commands for natural-language tasks.
  • Inspecting file permissions.
  • Finding files.
  • Viewing network interfaces and connections.
  • Resolving DNS records and checking host reachability.
  • Analyzing local logs.
  • Checking URL patterns for suspicious characteristics.
  • Identifying installed security and networking tools.
  • Analyzing potentially dangerous command patterns.

The command-risk analyzer and other defensive utilities are designed to help users make more informed decisions when working in a Linux terminal.

📚 Local Memory

SoulKing uses SQLite to store application data, including conversations, messages, command history, favorite commands, saved stories, and preferences.

Users can disable conversation-history saving through the application's configuration.

This local-first approach gives users more control over their saved data.

🔓 Why Does Open Innovation Matter?

For me, open innovation is about having the freedom to experiment with AI, customize it, and run it on my own machine rather than making an entire project dependent on a closed API.

SoulKing uses Ollama to run compatible open-weight models locally.

Here is why that matters.

🔒 1. Privacy and Local Control

A Linux assistant may be used to discuss system configurations, examine logs, or troubleshoot a machine.

Running AI locally can help keep those prompts on the user's own computer rather than sending every request to a third-party AI provider.

SoulKing also stores its application history locally by default and provides an option to disable history saving.

📴 2. Offline Resilience

One of the most interesting things about SoulKing is that its core utilities do not all depend on the AI service.

As the screenshots demonstrate, the application can report that Ollama is unreachable while still providing built-in stories, system information, and supported command-analysis functionality.

Once the required software and model have been installed, local AI interactions can also work without an internet connection.

This makes the project useful even when a remote service is unavailable.

🧠 3. Freedom to Experiment

Using a local AI runtime allows developers to experiment with compatible models and customize the assistant's behavior.

SoulKing supports changing the selected model and switching between personality modes.

This flexibility makes it easier to explore different models, prompts, and approaches without redesigning the whole application around one proprietary provider.

💸 4. Fewer Dependencies on Paid APIs

Local inference avoids mandatory per-request fees from a hosted AI API.

It still requires computing resources, memory, electricity, and sufficient hardware for the chosen model, but it gives developers another way to experiment without relying on a paid inference service.

🔓 5. Keeping Projects Under Our Control

A project built entirely around a closed service can be affected by changes in availability, pricing, or access limits.

By using a local runtime and modular components, SoulKing gives developers more control over how their application evolves.

Open innovation is not just about using AI. It's about having the freedom to decide where it runs, how it behaves, and how it can be changed.

🤖 My Agent Session

I used AI-assisted development while building and refining SoulKing's architecture, terminal interactions, and features.

I'm also exploring DevRelay to document the development process for this challenge.

💀 The Spirit of It

"Even without a body, intelligence lives on. Yohohoho!"

The Ghost in the Machine theme made me think about the relationship between computers, memory, and personality.

A terminal is normally a place for commands, logs, and predictable output. SoulKing adds a fictional digital spirit that can tell stories, explain commands, and respond with a little theatrical mischief.

The most interesting part is that the atmosphere does not depend entirely on a live AI connection.

In the screenshots, Ollama is offline, yet SoulKing still tells a story about a mysterious violin in /dev/null.

That small moment captures the idea behind the project: a machine can still have character, even when one of its services goes silent.

The ghost is fictional, but the freedom to experiment with local AI and keep useful software running on our own machines is real.

Maybe the ghost isn't really in the machine.

Maybe it's in the code we choose to keep alive. 👻

🏆 Prize Categories

Thanks for checking out SoulKing AI!

If you enjoy Linux, open-source AI, terminal tools, or spooky software projects, I'd love to hear what you think.

Your terminal. Your AI. Your phantom. 💀🎸

Top comments (0)