Topic: Simply Fortan AI?

Jeff,
I am just curious if it's possible/feasible to create a tool (Python script) that calls the Anthropic Claude API along side Simply Fortran that's directed to Fortran source/project files, thereby having a Fortran coding assistant alongside but outside of Simply Fortran? 

Having Claude alongside Simply Fortran would assistant in (1) identifying bugs, (2) diagnose errors, (3) review code, and drafting new code.  If this cannot be done, what about running Claude in a Windows Powershell terminal pointing to the Fortran project alongside Simply Fortran?

Please excuse my lack of complete understanding of how to implement Claude while running SF.  I just think it would be useful to have a Claude window pointing to Fortran projects while running Simply Fortran IDE.

Frank

Re: Simply Fortan AI?

Frank,

Simply Fortran doesn't really have any plugin or particular integration of AI features, so any AI coding agents would be running, in theory, independent of Simply Fortran.  Simply Fortran does monitor file modification times; any changes made by an external agent would indeed be incorporated into the build process (unless the AI agent added files, which would require the Simply Fortran user to manually add them to the project).

There's no reason an AI coding agent or agents couldn't be run alongside Simply Fortran in the project directory, but Simply Fortran isn't particularly aware of them except if a known file within the Simply Fortran project is modified.

I don't have any particular design plans to change this behavior at this time. Simply Fortran continues to be entirely hand-coded, so I also don't have much experience with using Claude.

Jeff Armstrong
Approximatrix, LLC

Re: Simply Fortan AI?

drfrank, when I use Claude, it's easy enough to run the app next to SimplyFortran, or on a separate monitor. I think you are asking if it could be bundled, integrating it inside SimplyFortran so it can watch your keystrokes - that's a horse of a different color.

So my "along side" is a physical window and an independent app. You "along side" is a little more ... intimate.

4

Re: Simply Fortan AI?

Jeff,

I asked Claude if it could be used with Simply Fortran and received the following responses. I'm not sure if this could work with Simply Fortran, but it may be worth considering.

Frank
!-----

How can I run Claude Code in a terminal (Windows Command Prompt, PowerShell) and point it to my Fortran project directory? Can you show me a 'mock' example of how this is done? 

Step 1 — Install Claude Code
The recommended method today is the native installer — no Node.js required; it auto-updates in the background.

Open PowerShell and run: powershell
irm https://claude.ai/install.ps1 | iex

Then close and reopen your terminal. This is necessary to apply the PATH changes.
Note: Git for Windows is recommended on native Windows so Claude Code can use the Bash tool. If Git for Windows is not installed, Claude Code uses PowerShell as the shell tool instead.

Step 2 — Authenticate
Run claude for the first time from any directory:

A browser window will open automatically for OAuth authentication — no API key management needed. Log in with your Anthropic account (Claude Pro or Max subscription).

Step 3 — Navigate to your Fortran project & start working
This is the key part - you simply cd into your project folder, then type claude. Here's a mock example of what a full session looks like:

PS C:\> cd C:\Users\YourName\Projects\FortranSolver

PS C:\Users\YourName\Projects\FortranSolver> claude

???????????????????????????????????????
?  Claude Code  v2.x.x                ?
?  Logged in as: yourname@email.com   ?
???????????????????????????????????????

Working directory: C:\Users\YourName\Projects\FortranSolver

> What would you like to do?

Now you can type natural language requests, for example:

> Explain what solver.f90 does

? Reading solver.f90...

  This is a finite-difference solver for the 1D heat equation.
  It uses an explicit Euler time-stepping scheme with Dirichlet
  boundary conditions. The main subroutine `heat_solve` takes
  grid size N, time step dt, and total time T as arguments.

  Potential issue: your stability criterion (dt <= dx^2 / 2*alpha)
  may be violated for large N — want me to add a check for that?

> Yes, add a stability check and warn the user if it's violated

? Editing solver.f90...
  + Added stability check before time loop
  + Added WRITE(*,*) warning if dt > dx**2 / (2.0 * alpha)

  Done. Want me to recompile and test it?

Quick Reference — Useful things to ask Claude Code in your Fortran project
What you type:
Explain main.f90    Reads and summarizes the file
Find any bugs in matrix_ops.f90   
Reviews code for issues
Add error handling to the read_input subroutine    Edits the file directly
What does this compile error mean: [paste error]    Diagnoses gfortran errors
Write a test for the solver subroutine    Creates a test program

One important note for Windows
Native Windows installs can run into some friction: path separators behave differently, some shell commands won't work in PowerShell, and certain file permission operations can fail silently. WSL2 removes most of these headaches — so if you run into issues, installing WSL2 (Windows Subsystem for Linux) is worth considering as an alternative path.

But for most Fortran work — reading files, editing code, explaining logic - the native Windows install should work just fine!
Claude is AI and can make mistakes. Please double-check cited sources.